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/83aa4ed4-7257-4abf-ac48-794a5f04bc4dn%40googlegroups.com.
  • Go... Sebastian Iskra
    • ... Sebastian
      • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
        • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum

Reply via email to