An error has occurred: [AuthorizationError.USER_PERMISSION_DENIED @ ; trigger:'']

82 views
Skip to first unread message

Bhumin B

unread,
May 12, 2016, 9:05:31 AM5/12/16
to AdWords API Forum
when i'm using BasicOperations/GetKeywords.php it will seems like this error
all steps are correct but i think customer id concept i'b miss so gide me the how it work!!!

An error has occurred: [AuthorizationError.USER_PERMISSION_DENIED @ ; trigger:'']

SOAP file LOG

[May 12 2016 08:38:51.000000 - ERROR] POST /api/adwords/cm/v201509/CampaignService HTTP/1.1
Host: adwords.google.com
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.5.12, gzip
Accept-Encoding: gzip, deflate
Content-Encoding: gzip
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Content-Length: 436
Authorization: Bearer xxxx.xxxxbi5kjdGuyA9kj64Eeik39iqQteddHeYBxwFjz41ZlxzPxxxx-xxxxxxxxxxx
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201509">
  <SOAP-ENV:Header>
    <ns1:RequestHeader>
      <ns1:clientCustomerId>XXX-XXX-XXXX</ns1:clientCustomerId>
      <ns1:developerToken>XXXXXXXXXXXXXXXXXXX</ns1:developerToken>
      <ns1:userAgent>TestName(AwApi-PHP/8.3.0, Common-PHP/8.3.0, PHP/5.5.12)</ns1:userAgent>
    </ns1:RequestHeader>
  </SOAP-ENV:Header>
  <SOAP-ENV:Body>
    <ns1:get>
      <ns1:serviceSelector>
        <ns1:fields>Id</ns1:fields>
        <ns1:fields>Name</ns1:fields>
        <ns1:ordering>
          <ns1:field>Name</ns1:field>
          <ns1:sortOrder>ASCENDING</ns1:sortOrder>
        </ns1:ordering>
        <ns1:paging>
          <ns1:startIndex>0</ns1:startIndex>
          <ns1:numberResults>500</ns1:numberResults>
        </ns1:paging>
      </ns1:serviceSelector>
    </ns1:get>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

HTTP/1.1 500 Internal Server Error
Content-Type: text/xml; charset=UTF-8
Content-Encoding: gzip
Date: Thu, 12 May 2016 06:39:10 GMT
Expires: Thu, 12 May 2016 06:39:10 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: GSE
Transfer-Encoding: chunked

<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header>
    <ResponseHeader xmlns="https://adwords.google.com/api/adwords/cm/v201509">
      <requestId>0005329f6a7098100a4c97c6bc08aa55</requestId>
      <serviceName>CampaignService</serviceName>
      <methodName>get</methodName>
      <operations>1</operations>
      <responseTime>37</responseTime>
    </ResponseHeader>
  </soap:Header>
  <soap:Body>
    <soap:Fault>
      <faultcode>soap:Server</faultcode>
      <faultstring>[AuthorizationError.USER_PERMISSION_DENIED @ ; trigger:'&lt;null&gt;']</faultstring>
      <detail>
        <ApiExceptionFault xmlns="https://adwords.google.com/api/adwords/cm/v201509">
          <message>[AuthorizationError.USER_PERMISSION_DENIED @ ; trigger:'&lt;null&gt;']</message>
          <ApplicationException.Type>ApiException</ApplicationException.Type>
          <errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="AuthorizationError">
            <fieldPath/>
            <trigger>&lt;null&gt;</trigger>
            <errorString>AuthorizationError.USER_PERMISSION_DENIED</errorString>
            <ApiError.Type>AuthorizationError</ApiError.Type>
            <reason>USER_PERMISSION_DENIED</reason>
          </errors>
        </ApiExceptionFault>
      </detail>
    </soap:Fault>
  </soap:Body>
</soap:Envelope>

Umesh Dengale

unread,
May 12, 2016, 2:07:11 PM5/12/16
to AdWords API Forum
Hello,

The AuthorizationError.USER_PERMISSION_DENIED means your OAuth credentials don't match clientCustomerId you specify or any of its manager accounts. Please check the client identifier and client secret you are using are from manager account authenticated and there is a link between client customer id and manager account authenticated. Please check the detailed reason for this error is covered here and refer the OAuth2.0 guide for more information.

Thanks,
Umesh, AdWords API Team.
Reply all
Reply to author
Forward
0 new messages