Hi,
But when I try to use the provided GetCampaings script, I get this error (The anonymized part is my developer token.):
An error has occurred: [QuotaCheckError.INVALID_TOKEN_HEADER @ ; trigger:'xxxxxxxx_xxxxxxxxxxxxxx']
I really don't know what's going on as I didn't write a single line of PHP and only used provided examples.
The weird part is that the AdWords server respond with a 500 error and the header is obviously syntactically "valid".
Below is the full SOAP log generated by the library:
[Apr 26 2016 11:20:57.000000 - ERROR] POST /api/adwords/cm/v201603/CampaignService HTTP/1.1
Connection: Keep-Alive
Accept-Encoding: gzip, deflate
Content-Encoding: gzip
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Content-Length: 474
Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Header>
<ns1:RequestHeader>
<ns1:clientCustomerId>xxx-xxx-xxxx</ns1:clientCustomerId>
<ns1:developerToken>xxxxxxxx_xxxxxxxxxxxxxx</ns1:developerToken>
<ns1:userAgent>x.xxxxxxxx.com:xxxxxxxxxxxxx:V0.0.1 (AwApi-PHP/8.3.0, Common-PHP/8.3.0, PHP/5.6.20-1+deb.sury.org~trusty+1)</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: Tue, 26 Apr 2016 09:20:57 GMT
Expires: Tue, 26 Apr 2016 09:20:57 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:Header>
<requestId>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</requestId>
<serviceName>CampaignService</serviceName>
<methodName>get</methodName>
<operations>1</operations>
<responseTime>14</responseTime>
</ResponseHeader>
</soap:Header>
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>[QuotaCheckError.INVALID_TOKEN_HEADER @ ; trigger:'xxxxxxxx_xxxxxxxxxxxxxx']</faultstring>
<detail>
<message>[QuotaCheckError.INVALID_TOKEN_HEADER @ ; trigger:'xxxxxxxx_xxxxxxxxxxxxxx']</message>
<ApplicationException.Type>ApiException</ApplicationException.Type>
<fieldPath/>
<trigger>xxxxxxxx_xxxxxxxxxxxxxx</trigger>
<errorString>QuotaCheckError.INVALID_TOKEN_HEADER</errorString>
<ApiError.Type>QuotaCheckError</ApiError.Type>
<reason>INVALID_TOKEN_HEADER</reason>
</errors>
</ApiExceptionFault>
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>