Hi experts i am gettting issue in setup google adwords api in php

29 views
Skip to first unread message

test...@gmail.com

unread,
Nov 16, 2016, 1:26:14 AM11/16/16
to AdWords API Forum

i have followed all the steps to create a refresh token and usign php sdk (github) provided by google ,
when i try to fetch a user campaign i am getting the following errror , i am using a test account and making a request on test account to fetch but sill getting the same error

An error has occurred: [AuthorizationError.USER_PERMISSION_DENIED @ ; trigger:''] 

what do i need to do ?
i am using test...@gmail.com as my test manager account.

Peter Oliquino

unread,
Nov 16, 2016, 2:02:36 AM11/16/16
to AdWords API Forum
Hi,

The USER_PERMISSION_DENIED error suggests that there could be no link between the client account and the MCC account, or that your OAuth2 credentials do not match the clientCustomerId. For the first scenario, you may use the GetAccountHierarchy example (while using the MCC account ID as the value for the clientCustomerId) to check which client accounts are associated to your MCC. 

For the second scenario, could you confirm if you used the same email associated to your MCC account to generate your OAuth2 credentials? If no, then I would recommend that you recreate your credentials while logged in to the email account associated to your MCC. I hope this helps and please let me know if the issue persists.

Best regards,
Peter
AdWords API Team

test...@gmail.com

unread,
Nov 16, 2016, 2:37:44 AM11/16/16
to AdWords API Forum
i followed the following steps:
1) i created test manager account (test...@gmail.com) from i create adwords api credentials 
2) Then i used developer console from test...@gmail.com to generate oauth credentials
3) then i followed instruction to generate refreshtoken fromn GetRefreshtoken.php 
4) i used the customer id for test...@gmail.com(test manager account) to test if the api is working but it is giving me the api issue : USER_PERMISSION_DENIED.
5) now i am unable to figure out what exactly i need to do get it run successfull

test...@gmail.com

unread,
Nov 16, 2016, 2:44:13 AM11/16/16
to AdWords API Forum
in the first scenerio i created the outh credentials from the same test manager account , when i tried to execute  GetAccountHierarchy example i used the customer id which of my test manager account , it gave me USER_PERMISSION_DENIED

for the second scenerio i rechecked the the credentials with my test manager account , the oauth credentials are associated with the test...@gmail.com (same test manager account)

Michael Cloonan (AdWords API Team)

unread,
Nov 16, 2016, 8:43:29 AM11/16/16
to AdWords API Forum
Hello,

It appears that this account is an AdWords Express account, which I do not believe is accessible through the API. Please try following the same steps you tried but using a regular AdWords account to see if that resolves the issue.

Regards,
Mike, AdWords API Team
Reply all
Reply to author
Forward
0 new messages