how to get Adwords report for third party user using Refresh and Access Token ?

42 views
Skip to first unread message

v

unread,
Jun 24, 2017, 5:32:03 AM6/24/17
to AdWords API Forum

Hi, 

I have created Adword Report for Third Party User which is not linked with my Manager Account...

Using Adword API (v201702). But I getting Error :

Fatal error: Uncaught Google\AdsApi\AdWords\v201702\cm\ApiException: Details: [fieldPath: ; trigger: <null>; errorString: AuthorizationError.USER_PERMISSION_DENIED] 

Shwetha Vastrad (AdWords API Team)

unread,
Jun 26, 2017, 1:54:03 PM6/26/17
to AdWords API Forum
Hi, 

This error occurs when there is no link between the manager account authenticated in the request and the client account specified in the headers. This could be because the link between the manager and client account was removed or your OAuth credentials are for a user who does not have access to the client customer ID specified or any of its manager accounts. Could you use CustomerService.getCustomers() to check the list of accounts directly accessible by the OAuth2 credentials? You can also use ManagedCustomerService to get the list of accounts linked to your manager account.

Regards,
Shwetha, AdWords API Team.

v

unread,
Jun 27, 2017, 12:53:58 AM6/27/17
to AdWords API Forum
Hi, 
Thanks for reply.

I know that my Adword account is not linked.....I want to implement(Using API) for those adwords account which is not linked with manager account like Third Party User.....I Used Outh2 Method For Implement this...

Also Using Outh2 Method when i used client account credential(which is linked with manager account) for login i getting only manager account data not getting client account  data..

Shwetha Vastrad (AdWords API Team)

unread,
Jun 27, 2017, 1:03:38 PM6/27/17
to AdWords API Forum
Hi, 

To use AdWords API to target an account, you need log in as a user who has access to that account or its manager when you generate the refresh token. You'll not be able to use the refresh token generated from your manager account to target accounts that aren't linked to it. Please follow the steps provided here to generate the refresh token for the required account. 

For the second question, could you check that the clientCustomerId provided in the API request belongs to your AdWords client account and not your Manager account? If it is, could you tell me which service you are trying to use? If possible, please enable logging and provide the request and response logs so I can take a look. Please use Reply privately to author when responding. 
Reply all
Reply to author
Forward
0 new messages