Refresh token usage for downloading adhoc reports

104 views
Skip to first unread message

AMAR NAYAK

unread,
Aug 29, 2014, 1:06:10 AM8/29/14
to adwor...@googlegroups.com
Hi ,
I need to download couple of performance reports : Adgroup and Campaign performance report using adhoc reports.
I am going through the v201406 documentation and getting confuse over the usage of refresh token .
Do we need to use refresh token in adhoc reports ? If yes ,where should I use it?
Are there any examples of adhoc report downloads not using the client library ?

Thanks,
-Amar

Josh Radcliff (AdWords API Team)

unread,
Aug 29, 2014, 9:23:19 AM8/29/14
to adwor...@googlegroups.com
Hi Amar,

You need an OAuth access token for any API request, including reporting requests -- see the OAuth2 Guide for an overview of the basic steps for OAuth.

If you want to construct reporting requests without a client library, check out our Reporting Basics Guide, which includes information about the required headers and parameters for reports.

I'd encourage you to use one of our client libraries, if possible. They handle all of the OAuth requests and responses for you and make using the API much easier all around.

Cheers,
Josh, AdWords API Team

AMAR NAYAK

unread,
Aug 29, 2014, 6:05:39 PM8/29/14
to adwor...@googlegroups.com
Hi Josh,
Thanks for your reply.
I want to download an adgroup performance report for multiple client accounts under the MCC account.
Using client library I saw an example for downloading a report for a particular client account.
Is there an example somewhere that shows how to pull reports for multiple client accounts.
I am planning to use Java API .
Thanks,
-Amar

Josh Radcliff (AdWords API Team)

unread,
Sep 2, 2014, 9:52:48 AM9/2/14
to adwor...@googlegroups.com
Hi Amar,

You cannot download reports for all accounts under an MCC in one request, but you can take the following approach:

1. Get the list of all accounts under your MCC. See the GetAccountHierarchy.java example for one way to do this.
2. For each AdWords account under your MCC, set the clientCustomerId to the account's customer ID (you can do this in the Java library by calling setClientCustomerId on your AdWordsSession), and then submit your report request.

Cheers,
Josh, AdWords API Team

AMAR NAYAK

unread,
Sep 5, 2014, 1:05:17 AM9/5/14
to adwor...@googlegroups.com
Thanks a lot Josh! That helped.
Reply all
Reply to author
Forward
0 new messages