Re: HELP: AuthorizationError.SERVICE_ACCESS_DENIED

131 views
Skip to first unread message
Message has been deleted

Vincent Racaza (AdWords API Team)

unread,
Apr 12, 2018, 2:55:43 AM4/12/18
to AdWords API Forum
Hi Kevin,

I deleted your post as it contains your confidential information such as clientCustomerId. In the future, please do not include any confidential information in a public post. You may refer to this guide before posting. Re-posting this with masked information:
HI,
I tried to use googleads-java-lib(https://github.com/googleads/googleads-java-lib) to access adwords data,but got the ERROR AuthorizationError.SERVICE_ACCESS_DENIED.I am very confused about this problem,cause I am the admin user on my MCC account and I have got correct Credentials in google concole account with admin permission. Also I got refresh_token with auth_code.Our developerToken on MCC account is the basic access level.

Here is some urls and scope which I have used:

Best regards.

This is the soap request and response:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <soapenv:Header>
        <ns1:RequestHeader xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201802" soapenv:mustUnderstand="0">
            <ns1:clientCustomerId>XXX-XXX-XXXX</ns1:clientCustomerId>
            <ns1:developerToken>REDACTED</ns1:developerToken>
            <ns1:userAgent>unknown (AwApi-Java, AdWords-Axis/3.13.0, Common-Java/3.13.0, Axis/1.4, Java/1.7.0_65, jars, SelectorBuilder, SelectorField)</ns1:userAgent>
            <ns1:validateOnly>false</ns1:validateOnly>
            <ns1:partialFailure>false</ns1:partialFailure>
        </ns1:RequestHeader>
    </soapenv:Header>
    <soapenv:Body>
            <serviceSelector>
                <fields>Id</fields>
                <fields>Name</fields>
                <ordering>
                    <field>Name</field>
                    <sortOrder>ASCENDING</sortOrder>
                </ordering>
                <paging>
                    <startIndex>0</startIndex>
                    <numberResults>100</numberResults>
                </paging>
            </serviceSelector>
        </get>
    </soapenv:Body>
</soapenv:Envelope>

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Header>
        <ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/v201802">
            <requestId>0005698c139ffbd90a620f1b130b7439</requestId>
            <serviceName>CampaignService</serviceName>
            <methodName>get</methodName>
            <operations>1</operations>
            <responseTime>166</responseTime>
        </ResponseHeader>
    </soap:Header>
    <soap:Body>
        <soap:Fault>
            <faultcode>soap:Client</faultcode>
            <faultstring>[AuthorizationError.SERVICE_ACCESS_DENIED @ ]</faultstring>
            <detail>
                <ApiExceptionFault xmlns="https://adwords.google.com/api/adwords/cm/v201802">
                    <message>[AuthorizationError.SERVICE_ACCESS_DENIED @ ]</message>
                    <ApplicationException.Type>ApiException</ApplicationException.Type>
                    <errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="AuthorizationError">
                        <fieldPath/>
                        <trigger/>
                        <errorString>AuthorizationError.SERVICE_ACCESS_DENIED</errorString>
                        <ApiError.Type>AuthorizationError</ApiError.Type>
                        <reason>SERVICE_ACCESS_DENIED</reason>
                    </errors>
                </ApiExceptionFault>
            </detail>
        </soap:Fault>
    </soap:Body>
</soap:Envelope>
Thanks,
Vincent
AdWords API Team

Vincent Racaza (AdWords API Team)

unread,
Apr 12, 2018, 2:56:26 AM4/12/18
to adwor...@googlegroups.com
Hi Kevin,

The SERVICE_ACCESS_DENIED error means that the user authorizing the API call doesn't have access to the specific service, or in your scenario, is not allowed to use the CampaignService. If indeed that the user (email address you used to generate the OAuth2 credentials) does not have access, then you could request an Admin user on the account to grant that user the necessary access level. You may refer to this guide to know more about the access levels in AdWords.

However, since you confirmed that you are already an administrator of your AdWords account and this error still persists, then can you provide to me the specific email address you used in your authentication via Reply privately to author option so I can further investigate?

Kevin Tian

unread,
Apr 12, 2018, 3:32:07 AM4/12/18
to adwor...@googlegroups.com
Hi Vincent, Thank you for the reply.And this is  my email to access my MCC account XXXXXXX

I have tried everything I can so to solve this but no result.



在 2018年4月12日星期四 UTC+8下午2:56:26,Vincent Racaza (AdWords API Team)写道:
Hi Kevin,

The SERVICE_ACCESS_DENIED error means that the user authorizing the API call doesn't have access to the specific service, or in your scenario, is not allowed to use the CampaignService. If indeed that the user (email address you used to generate the OAuth2 credentials) does not have access, then you could request an Admin user on the account to grant that user the necessary access level. You may refer to this guide to know more about the access levels in AdWords.

However, since you confirmed that you are already an administrator of your AdWords account and this error still persists, then can you provide to me the specific email address you used in your authentication so I can further investigate?

Vincent Racaza (AdWords API Team)

unread,
Apr 12, 2018, 5:22:24 AM4/12/18
to AdWords API Forum
Hi Kevin,

It appears that you have already contacted my colleague in a private email in regards to this specific issue. Our team will continue the discussion on the private email thread so there will be one thread to monitor for this issue.

nedved

unread,
Aug 28, 2018, 5:27:29 AM8/28/18
to AdWords API and Google Ads API Forum
 I have the same issue.
Reply all
Reply to author
Forward
0 new messages