[2019-06-12 15:29:57] google-ads.NOTICE: Request
-------
Method Name: /google.ads.googleads.v1.services.GoogleAdsService/Search
Host: googleads.googleapis.com
Headers: {
"x-goog-api-client": "gl-php\/7.2.18-1+ubuntu16.04.1+deb.sury.org+1 gapic\/ gax\/0.38.1 grpc\/1.19.0",
"x-goog-request-params": "customer_id=9787711904",
"developer-token": "REDACTED",
"login-customer-id": "4554523147"
}
Request: {"customerId":"9787711904",
"query":"
SELECT
customer.id,
customer.manager,
customer.currency_code,
customer.descriptive_name,
customer.time_zone,
customer.test_account,
customer.resource_name,
customer.auto_tagging_enabled,
customer.tracking_url_template,
customer.final_url_suffix,
customer.conversion_tracking_setting.conversion_tracking_id
FROM
customer
"}
Response
-------
Headers: {
"request-id": "W0hmBQBSfpTqVplr2qamCw",
"date": "Wed, 12 Jun 2019 13:29:57 GMT",
"alt-svc": "quic=\":443\"; ma=2592000; v=\"46,44,43,39\""
}
Fault
-------
Status code: 7
Details: The caller does not have permission
Failure: {"errors":[{"errorCode":{"authorizationError":"USER_PERMISSION_DENIED"},"message":"User doesn't have permission to access customer. Note: If you're accessing a client customer, the manager's customer id must be set in the 'login-customer-id' header. See https:\/\/developers.google.com\/google-ads\/api\/docs\/concepts\/call-structure#login-customer-id"}]}
[2019-06-12 15:31:32] google-ads.WARNING: Request made: Host: "googleads.googleapis.com", Method: "/google.ads.googleads.v1.services.GoogleAdsService/Search", ClientCustomerId: 9787711904, RequestId: "pdTJsdb148r5jB4tnUFFcw", IsFault: 1, FaultMessage: "["User doesn't have permission to access customer. Note: If you're accessing a client customer, the manager's customer id must be set in the 'login-customer-id' header. See https:\/\/developers.google.com\/google-ads\/api\/docs\/concepts\/call-structure#login-customer-id"]"
<?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/mcm/v201809"
xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201809">
<SOAP-ENV:Header>
<ns1:RequestHeader>
<ns2:clientCustomerId>6446210156</ns2:clientCustomerId>
<ns2:developerToken>REDACTED</ns2:developerToken>
<ns2:userAgent>....
</ns2:userAgent>
<ns2:validateOnly>false</ns2:validateOnly>
<ns2:partialFailure>false</ns2:partialFailure>
</ns1:RequestHeader>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns1:getCustomers/>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<ResponseHeader xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201809"
xmlns="https://adwords.google.com/api/adwords/mcm/v201809">
<ns2:requestId>00058b38333e45ae0a858ccb460cfe2f</ns2:requestId>
<ns2:serviceName>CustomerService</ns2:serviceName>
<ns2:methodName>getCustomers</ns2:methodName>
<ns2:operations>0</ns2:operations>
<ns2:responseTime>124</ns2:responseTime>
</ResponseHeader>
</soap:Header>
<soap:Body>
<getCustomersResponse xmlns="https://adwords.google.com/api/adwords/mcm/v201809"
xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201809">
<rval>
<customerId>6446210156</customerId>
...
</rval>
</getCustomersResponse>
</soap:Body>
</soap:Envelope>
Hello Konstantin,
Thanks for sending the email address. The email address. login-customer-id and client-customer-id are good. You will be able to validate your credentials by using the OAuth doctor. The tool will help determine if your OAuth2 credentials are correctly configured and ready to make API calls and guide you through fixing any OAuth2 problems it detects and verify the corrected configuration. Please give this a try and let us know if you have any issues.
Regards,
Sai Teja, Google Ads API Team