The developer token used is from the main account (not test account). The email used with google cloud and the main google ads account has full access to the test account, which was created under a new e-mail.
I also tried adding linked-customer-id in the header with the subaccount of test account with the following result HTTP/1.1 403 Forbidden Content-length: 735 X-xss-protection: 0 X-content-type-options: nosniff Transfer-encoding: chunked Request-id: BOHIrkVbrCFXtb28rGTdSA Vary: Origin, X-Origin, Referer Server: ESF -content-encoding: gzip Cache-control: private Date: Thu, 14 Jul 2022 15:50:06 GMT X-frame-options: SAMEORIGIN Alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43" Content-type: application/json; charset=UTF-8[ { "error": { "status": "PERMISSION_DENIED", "message": "The caller does not have permission", "code": 403, "details": [ { "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#cid " } ], "@type": "type.googleapis.com/google.ads.googleads.v11.errors.GoogleAdsFailure", "requestId": "BOHIrkVbrCFXtb28rGTdSA" } ] } } ] The manager customer id is already set under the header login-customer-id. OAuth 2.0 Playground is connected to the test account email when configuring the POST request. Not sure if i miss any header besides the mentioned ones? On Thursday, 14 July 2022 at 17:03:48 UTC+2 Sebastian wrote: > Hi everyone, > > with OAuth2 Playground i've been trying to send a POST request to access > campaign data in a google ads test account (test account access), but > always have been receiving the status message > "REQUESTED_METRICS_FOR_MANAGER". > > I tried to adjust the Request URI, switch manager customer id to account > customer id or added other header without any result. > What do i need to change in the request to access account level and > campaign level data? > Do i need to add the test account credentials to the cloud project? > > Here is the full request & response: > > POST /v11/customers/39xxxx/googleAds:searchStream HTTP/1.1 Host: > googleads.googleapis.com Content-length: 381 Manager-customer-id: xxxxx > Customer-id: xxxxx Developer-token: xxxxx Content-type: application/json > Authorization: Bearer ya29xxxxxx > { > "query": "SELECT campaign.name, > campaign_budget.amount_micros, > campaign.status, > campaign.optimization_score, > campaign.advertising_channel_type, > metrics.clicks, > metrics.impressions, > metrics.ctr, > metrics.average_cpc, > metrics.cost_micros, > campaign.bidding_strategy_type > FROM campaign > WHERE segments.date DURING LAST_7_DAYS > AND campaign.status != 'REMOVED'" > } > > HTTP/1.1 400 Bad Request Content-length: 637 X-xss-protection: 0 > X-content-type-options: nosniff Transfer-encoding: chunked Request-id: > lOAGC-ddlL5Ve5mA_GhaPQ Vary: Origin, X-Origin, Referer Server: ESF > -content-encoding: gzip Cache-control: private Date: Thu, 14 Jul 2022 > 13:59:33 GMT X-frame-options: SAMEORIGIN Alt-svc: h3=":443"; > ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; > ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; > ma=2592000,quic=":443"; ma=2592000; v="46,43" Content-type: > application/json; charset=UTF-8[ > { > "error": { > "status": "INVALID_ARGUMENT", > "message": "Request contains an invalid argument.", > "code": 400, > "details": [ > { > "errors": [ > { > "errorCode": { > "queryError": "REQUESTED_METRICS_FOR_MANAGER" > }, > "message": "Metrics cannot be requested for a manager > account. To retrieve metrics, issue separate requests against each client > account under the manager account." > } > ], > "@type": " > type.googleapis.com/google.ads.googleads.v11.errors.GoogleAdsFailure", > "requestId": "lOAGC-ddlL5Ve5mA_GhaPQ" > } > ] > } > } > ] > > Thanks > Sebastian > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 "Google Ads API and AdWords 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/695fc4e6-ac99-41c9-9284-16608e22c992n%40googlegroups.com.