AuthorizationError.USER_PERMISSION_DENIED

41 views
Skip to first unread message

SUBIN P VASU

unread,
Aug 1, 2020, 5:23:16 PM8/1/20
to AdWords API and Google Ads API Forum

Hi,

I was trying to connect an Adwords account from my adwords account and I have reached up to generating refresh token without any fail.

I got the refresh token and made a call for getting customer details using Customer Service. The result is given below.

Help me, I really need it. any kind of hints will be appreciated.

Fatal error: Uncaught exception 'Google\AdsApi\AdWords\v201809\cm\ApiException' with message '[AuthorizationError.USER_PERMISSION_DENIED @ ; trigger:'<null>']' in /home/wwwsaffronsunene/public_html/js/sasing/oauth/vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/Util/Reflection.php:43 Stack trace: #0 /home/wwwsaffronsunene/public_html/js/sasing/oauth/vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/Util/Reflection.php(43): ReflectionClass->newInstanceArgs(Array) #1 /home/wwwsaffronsunene/public_html/js/sasing/oauth/vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/AdsSoapClient.php(203): Google\AdsApi\Common\Util\Reflection->createInstance('Google\\AdsApi\\A...', '[AuthorizationE...') #2 /home/wwwsaffronsunene/public_html/js/sasing/oauth/vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/AdsSoapClient.php(164): Google\AdsApi\Common\AdsSoapClient->parseApiExceptionFromSoapFault(Object(SoapFault)) #3 /home/wwwsaffronsunene/public_html/js/sasing/oauth/vendor/googleads/googleads-php-li in /home/wwwsaffronsunene/public_html/js/sasing/oauth/vendor/googleads/googleads-php-lib/src/Google/AdsApi/Common/Util/Reflection.php on line 43

Google Ads API Forum Advisor Prod

unread,
Aug 3, 2020, 2:17:42 PM8/3/20
to subin...@gmail.com, adwor...@googlegroups.com

Hi Subain

Thanks for reaching out. The AuthorizationError.USER_PERMISSION_DENIED occurs when there is no link between the manager account authenticated in the request and the client account specified in the headers. Please make sure there is linking between the MCC authenticated and the customer account requested.The problem could be that the OAuth2 credentials you used to authenticate the API calls are not generated from the email address which has the Admin access to the manager account of the customer account. Could you please make sure that the OAuth2 credentials are generated by the manager account and give it a try? If issue is persist, could you please send me the email you used to generate the OAuth2 credentials? Please reply privately to author options while sharing the details.

Thanks,
Nirmita Patel Google Ads Team



ref:_00D1U1174p._5004Q22ax8F:ref

SUBINPVASU

unread,
Aug 3, 2020, 2:24:11 PM8/3/20
to Google Ads API Forum Advisor Prod, adwor...@googlegroups.com
Thank you

I, with PHP lib, got the refresh token from the above part with the exception. I have taken that refresh token and tried to access the same account using Python lib, using the same tokens, and found it worked.
--
subinpvasu
9495546474
Reply all
Reply to author
Forward
0 new messages