refreshtoken user not in mi hierachy account

38 views
Skip to first unread message

ju...@norte.digital

unread,
Nov 19, 2018, 6:08:12 AM11/19/18
to AdWords API and Google Ads API Forum
Hello, I am trying to consume the adswords API with a refresh token generated after the user grants me the permissions, following this guide
https://github.com/googleads/googleads-php-lib/wiki/API-access-on-behalf-of-your-clients-(web-flow)

unfortunately I do not get the results I want,
my question is: does that generated refreshtoken work with accounts that are not in the account hierarchy of the developer token?
Captura de pantalla de 2018-11-16 13-52-27.png

Teja Makani

unread,
Nov 19, 2018, 12:42:59 PM11/19/18
to AdWords API and Google Ads API Forum
Hello Juan,

From the screenshot shared I see that you are facing USER_PERMISSION_DENIED error. Which means that there is no link between the manager account authenticated in the request and the client account specified in the headers. You need to make sure the user authenticating the API call must have access to the account targeted in the API call. You could refer this article to grant access to the user, before granting the access please refer to this access level guide. Please note that an approved developer token can be used to make API calls against any AdWords account. Please let me know if you have any further questions. 

Regards,
Sai Teja, AdWords API Team.

Teja Makani

unread,
Nov 19, 2018, 4:22:55 PM11/19/18
to AdWords API and Google Ads API Forum
Hello Juan,

You can get the client customer Id of an account via API only when the user making the API call has access to the account or the account is linked to any of the Manager accounts in the hierarchy. You could find the client customer Id(eg: 123-456-7890) on top right corner of the account via UI. To link accounts you could use ManagedCustomerService.mutatelink operation. You could refer this guide to know more about ManagedCustomerService. Please let me know if you have any further questions.


Regards,
Sai Teja, AdWords API Team.

On Monday, November 19, 2018 at 6:08:12 AM UTC-5, ju...@norte.digital wrote:

san...@anymindgroup.com

unread,
Nov 20, 2018, 6:20:08 AM11/20/18
to AdWords API and Google Ads API Forum
Hi Sai Teja,

It seems a problem with Adwords API just happened. Since yesterday, all our user having Standard Access (to MCC adwords accounts) having this AuthorizationError.USER_PERMISSION_DENIED api exception.

Can you please take a look. I just posted a new question regarding this issue. Our company is using about 350 google adwords accounts, so we need this to fix asap.
Many thanks,
Sang

Teja Makani

unread,
Nov 20, 2018, 2:54:20 PM11/20/18
to AdWords API and Google Ads API Forum
Hello Sang,

Looks like there is a new thread created for this concern. To avoid confusion lets continue our discussion on that thread.


Regards,
Sai Teja, AdWords API Team.

On Monday, November 19, 2018 at 6:08:12 AM UTC-5, ju...@norte.digital wrote:
Reply all
Reply to author
Forward
0 new messages