Getting AuthorizationError.USER_PERMISSION_DENIED while running getCampaign service

489 views
Skip to first unread message

MuniyasamyK

unread,
May 31, 2018, 12:45:33 PM5/31/18
to AdWords API and Google Ads API Forum
I am working on AdWords API integration with campaign service. Based on the reference link, I have created Maven project in eclipse using the client library. I have given the input through ad.properties like client id, client secret, developer token, refresh token. While compiling GetCampaigns.java file, I am getting the below error.

Request failed due to ApiException. Underlying ApiErrors:
  Error 0: AuthorizationError{apiErrorType=AuthorizationError, errorString=AuthorizationError.USER_PERMISSION_DENIED, fieldPath=, reason=USER_PERMISSION_DENIED, trigger=<null>}

I have searched the work around the above error, they have mentioned like "User doesn't have permission to access customer". what it means please give me the clarification in details.


Please find the attachment of the Error which I have faced while running campaign service and Kindly assist me to sort out the problem.

thanks,
muniyasamy K



getCampagins_Error.xml

Sreelakshmi Sasidharan (AdWords API Team)

unread,
May 31, 2018, 4:58:40 PM5/31/18
to AdWords API and Google Ads API Forum
Hi Muniyasamy, 

The USER_PERMISSION_DENIED error means that the user who authorized your API call does not have access to the target AdWords account. If you are using the credentials of an MCC account to make the calls against the client account, you have to make sure that the accounts are still linked. If you are using the credentials of the user on the target account, you will have to make sure that the person who authorized the call (who accepted the prompt manually to generate the authorization code while setting up OAuth) has access to the specific account. If you are doubtful about this, please follow the steps to setup the OAuth once again and accept the prompt while logged in as the user who has access to the account. 

If you believe that the credentials you are using has access to the target account, you could perform a CustomerService.getCustomers() and check for the results. If they are using the credentials of a manager account, it will list the MCC accounts and any other account that user has direct access to. If the target account is not listed in the results, that would mean that the credentials cannot access that specific account. Please give this a try and let me know if you are still facing issues. 

Thanks,
Sreelakshmi, AdWords API Team

Lithia Auto Stores

unread,
Jun 1, 2018, 6:05:24 AM6/1/18
to testingdevm...@gmail.com, AdWords API and Google Ads API Forum
Hi,

Please make sure your developer token have basic access in order to retrieve production data. if not you may need to apply for basic access. You can do that on the same page you got your developer token.There is an option to request for basic access.

Thanks
Sam

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
 
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/821bdd28-12e6-46d2-8a46-36e3065b75d2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages