How to fix SERVICE_ACCESS_DENIED problem.

158 views
Skip to first unread message

1603

unread,
Jun 14, 2018, 6:03:19 AM6/14/18
to AdWords API and Google Ads API Forum

What should I do? HELP ME!!!
I followed adwords api guide(https://developers.google.com/adwords/api/docs/guides/first-api-call), but I got a exception while I run "GetCampaigns.java", below is information.

1603

unread,
Jun 14, 2018, 6:03:19 AM6/14/18
to AdWords API and Google Ads API Forum
What should I do? HELP ME!!!
I followed adwords api guide(https://developers.google.com/adwords/api/docs/guides/first-api-call), but I got a exception while I run "GetCampaigns.java", below is information.

.
.
.

10:11:06.965 [main] DEBUG org.apache.axis.enterprise - Mapping Exception to AxisFault
com.google.api.ads.adwords.axis.v201806.cm.ApiException: null
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at java.lang.Class.newInstance(Class.java:442)
    at org.apache.axis.encoding.ser.BeanDeserializer.<init>(BeanDeserializer.java:104)
    at org.apache.axis.encoding.ser.BeanDeserializer.<init>(BeanDeserializer.java:90)
    at com.google.api.ads.adwords.axis.v201806.cm.ApiException.getDeserializer(ApiException.java:165)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.axis.encoding.ser.BaseDeserializerFactory.getSpecialized(BaseDeserializerFactory.java:154)
    at org.apache.axis.encoding.ser.BaseDeserializerFactory.getDeserializerAs(BaseDeserializerFactory.java:84)
    at org.apache.axis.encoding.DeserializationContext.getDeserializer(DeserializationContext.java:464)
    at org.apache.axis.encoding.DeserializationContext.getDeserializerForType(DeserializationContext.java:547)
    at org.apache.axis.message.SOAPFaultDetailsBuilder.onStartChild(SOAPFaultDetailsBuilder.java:157)
    at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:374)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2784)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:841)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:770)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:327)
    at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
    at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
    at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
    at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:796)
    at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
    at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
    at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
    at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
    at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
    at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
    at org.apache.axis.client.Call.invoke(Call.java:2767)
    at org.apache.axis.client.Call.invoke(Call.java:2443)
    at org.apache.axis.client.Call.invoke(Call.java:2366)
    at org.apache.axis.client.Call.invoke(Call.java:1812)
    at com.google.api.ads.adwords.axis.v201806.cm.CampaignServiceSoapBindingStub.get(CampaignServiceSoapBindingStub.java:1546)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.google.api.ads.common.lib.soap.SoapClientHandler.invoke(SoapClientHandler.java:100)
    at com.google.api.ads.common.lib.soap.axis.AxisHandler.invokeSoapCall(AxisHandler.java:234)
    at com.google.api.ads.common.lib.soap.SoapServiceClient.callSoapClient(SoapServiceClient.java:63)
    at com.google.api.ads.common.lib.soap.SoapServiceClient.invoke(SoapServiceClient.java:93)
    at com.sun.proxy.$Proxy17.get(Unknown Source)
    at com.magictavern.compass.adwords.example.GetCampaigns.runExample(GetCampaigns.java:124)
    at com.magictavern.compass.adwords.example.GetCampaigns.main(GetCampaigns.java:74)
10:11:07.041 [main] DEBUG org.apache.axis.SOAPPart - Enter: SOAPPart::getAsSOAPEnvelope()
.
.
.
10:11:07.106 [main] INFO com.google.api.ads.adwords.lib.client.AdWordsServiceClient.soapXmlLogger - SOAP request:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <soapenv:Header>
        <ns1:RequestHeader xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201806" soapenv:mustUnderstand="0">
            <ns1:clientCustomerId>private information</ns1:clientCustomerId>
            <ns1:developerToken>REDACTED</ns1:developerToken>
            <ns1:userAgent>unknown (AwApi-Java, AdWords-Axis/3.15.0, Common-Java/3.15.0, Axis/1.4, Java/1.8.0_152, maven, 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>

10:11:07.107 [main] INFO com.google.api.ads.adwords.lib.client.AdWordsServiceClient.soapXmlLogger - SOAP response:
<?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/v201806">
            <requestId>00056e909cab2c780a62b209f80b1a7a</requestId>
            <serviceName>CampaignService</serviceName>
            <methodName>get</methodName>
            <operations>1</operations>
            <responseTime>129</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/v201806">
                    <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>

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

V54328u

unread,
Jun 14, 2018, 6:12:37 AM6/14/18
to AdWords API and Google Ads API Forum
this link shows why are you facing this error. it's because "Developer doesn't have permission to access service."

here is the link:

Dhanya Sundararaju (AdWords API Team)

unread,
Jun 14, 2018, 9:10:03 AM6/14/18
to AdWords API and Google Ads API Forum
Hi,

Thank you for sharing the logs. Could you please send the logs with data NOT redacted? You may opt to reply privately to author.

Regards,
Dhanya, AdWords API Team
Message has been deleted

SK

unread,
Mar 13, 2019, 8:33:58 AM3/13/19
to AdWords API and Google Ads API Forum
Hello, 
I have started to receiver exactly same error since the developer token was approved. I have a process that uploaded hashed info for customer re marketing to Ads API, it worked fine on test, but since the developer token has been approved (which we needed in order to move the process to production environment), calls have started to fail in test & in production with below message.

Request failed due to ApiException. Underlying ApiErrors:

  Error 0: AuthorizationError{apiErrorType=AuthorizationError, errorString=AuthorizationError.SERVICE_ACCESS_DENIED, fieldPath=, reason=SERVICE_ACCESS_DENIED, trigger=}

The documentation suggest that 'developer doesn't have access to this service', which to us is a bit strange (like explained above). Also, in the production account > Tools > Account Access, nothing seems different than before.
Could you help or direct please? 
Thank you.

googleadsapi...@google.com

unread,
Mar 13, 2019, 3:05:04 PM3/13/19
to AdWords API and Google Ads API Forum
Hello Shahid,

There is another thread going on for the same concern. I have responded on the other thread. To avoid confusion, let's continue our discussion on that thread.

Regards,
Sai Teja, AdWords API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    http://googleadsdeveloper.blogspot.com/search/label/adwords_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.

Take Survey

Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/

Reply all
Reply to author
Forward
0 new messages