AuthorizationError.SERVICE_ACCESS_DENIED

395 views
Skip to first unread message

Deap

unread,
Apr 4, 2018, 5:44:48 AM4/4/18
to AdWords API Forum
Hi every one:
   I've already followed this site https://developers.google.cn/adwords/api/docs/guides/first-api-call to setup my client, but it always returns AuthorizationError.SERVICE_ACCESS_DENIED.
   I used client-lib-java and tried to generate different clientId、clientSecret、refreshToken, but it still returned AuthorizationError.SERVICE_ACCESS_DENIED.

  SERVICE_ACCESS_DENIED
Developer doesn't have permission to access service.
  I want to ask how to setup permission for developer.Is there any ways I miss?

Regards,
  Deap

Deap

unread,
Apr 4, 2018, 6:15:58 AM4/4/18
to AdWords API Forum
Hi,
  I've followed the site 
  to setup my client to invoke adword api, but I received an error AuthorizationError.SERVICE_ACCESS_DENIED(Developer doesn't have permission to access service.).

  I want to know why and how to setup my permission. 

Regards,
  Deap

Milind Sankeshware (AdWords API Team)

unread,
Apr 4, 2018, 11:45:20 AM4/4/18
to AdWords API Forum
Hi Deap,

As you found out, the SERVICE_ACCESS_DENIED error means that user authorizing the API call doesn't have access to the specific service. You could request the Admin user on the account to grant you necessary access level. Please check this guide to red more about access levels in AdWords. If this does not help you, could you please share the SOAP request and response, the client customer Id and the email Id of user authenticating the call? You could choose to reply privately while sharing the information.

Thanks,
Milind AdWords API Team.

Kevin Tian

unread,
Apr 11, 2018, 5:44:18 AM4/11/18
to AdWords API Forum
HI

I always meet the ERROR [AuthorizationError.SERVICE_ACCESS_DENIED] when I tried to access adwords api.


Firstly, I can confim I am admin user on my MCC account.

Use this url to get auth_code:

And this request to get refresh_token:
curl -d code=4/AABpxxxxxxxxxxxxxxxxxx -d client_id=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -d client_secret=xxxxxxxxxxxxxxxxxxxxxx -d redirect_uri=urn:ietf:wg:oauth:2.0:oob -d grant_type=authorization_code https://accounts.google.com/o/oauth2/token

My part of code is like this with Node.js:

let report = new AdwordsReport({
        developerToken: 'XXXXXXXXXXXX',
        userAgent: 'beta:reportDownload/1.0.1', 
        clientCustomerId: 'XXX-XXX-XXXX', 
        client_id: 'xxxxxxxxxxxxxxxxxxxxxxxx',
        client_secret: 'yyyyyyyyyyy',
        refresh_token: '1/xxxxxxxxxxxxxxxxxx'
    });
    report.getReport('v201802', {
        reportName: 'Custom Adgroup Performance Report',
        reportType: 'CAMPAIGN_PERFORMANCE_REPORT',
        fields: ['CampaignId', 'Impressions', 'Clicks', 'Cost'],
        filters: [
            { field: 'CampaignStatus', operator: 'IN', values: ['ENABLED', 'PAUSED'] }
        ],
        dateRangeType: 'CUSTOM_DATE', //defaults to CUSTOM_DATE. startDate or endDate required for CUSTOM_DATE
        startDate: new Date("2018-04-05"),
        endDate: new Date(),
        format: 'CSV' //defaults to CSV
    }, (error, report) => {
        console.log('error:', error);
        console.log('report:', report);
    });
//Output is:
//error: <?xml version="1.0" encoding="UTF-8" standalone="yes"?><reportDownloadError><ApiError><type>AuthorizationError.SERVICE_ACCESS_DENIED</type><trigger></trigger><fieldPath></fieldPath></ApiError></reportDownloadError>
//report: null


I have tried to read the related documents and the guide,but still get the error. Please tell me what can I do to sovle this problem.




Milind Sankeshware (AdWords API Team)

unread,
Apr 11, 2018, 11:31:20 AM4/11/18
to AdWords API Forum
Hi Kevin,

Could you please share the CID and developer token which you sent in request header, so that I can troubleshoot the issue? You could choose 'Reply privately to author' option when replying. 

Thanks,
Milind, AdWords API Team.

nedved

unread,
Aug 28, 2018, 5:27:31 AM8/28/18
to AdWords API and Google Ads API Forum
I have the same issue,

Milind Sankeshware (AdWords API Team)

unread,
Aug 28, 2018, 11:29:47 AM8/28/18
to AdWords API and Google Ads API Forum
Hi,

As you are making the call against the test account, the SERVICE_ACCESS_DENIED error means that user authorizing the API call doesn't have access to the specific service. You could request the Admin user on the account to grant you necessary access level. Please check this guide to read more about access levels in AdWords.

Thanks,
Milind, AdWords API Team

Milind Sankeshware (AdWords API Team)

unread,
Aug 29, 2018, 1:38:34 PM8/29/18
to AdWords API and Google Ads API Forum
Hi,

The MCC ID associated with the token seems to be approved for AdWords App Conversions and Remarketing API. This developer token does not have permissions to make API calls against the AdWords API, so your request might failing with SERVICE_ACCESS_DENIED. You can contact API Compliance team to check if it is possible to reuse the same token for AdWords API by submitting this form
Reply all
Reply to author
Forward
0 new messages