Hello,

we have a peculiar problem with the new Google Ads API.

We are trying to run the following request:

[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"]"



As you can see we get a USER_PERMISSION_DENIED.
We set the login-customer-id  to the id of the corresponding MCC, the 
account we request the data for is 9787711904 and is directly under the MCC 
4554523147.



A corresponding request to the CustomerService in the old Adwords API with 
the same CustomerId, credentials and Oauth refresh token works flawlessly.


We get an error like this for many more customers, but, on the other hand, 
many others work and we cannot see any structural difference or any 
difference in the approach between the working ones and the non-working 
ones. All which do not work in the new API work flawlessly in the old one.

What are we potentially doing wrong?

We know already that if there is an MCC chain like Account A <- 
Intermediate MCC B <- Top MCC C and we have the credentials for C, that we 
must use C as login-customer-id and not B. But in the given example the 
hierarchy consist only of the end account and it's MCC, the credentials 
(refresh token) are on the MCC.

Regards,
Konstantin



-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/fb649739-8e6a-41ea-b305-90c943b71e7b%40googlegroups.com.

Reply via email to