Hello

I am trying to access the googleads api using service accounts. To test it 
locally I am using impersonation getting back an access token and using 
that to make calls to the google ads api.

Below is my request 

curl -f  -v --request POST 
"https://googleads.googleapis.com/v11/customers/1234567/googleAds:search"; \

--header "Content-Type: application/json" \

--header "developer-token: 12345" \

--header "login-customer-id:1234567" \

--header  "Authorization: Bearer $(gcloud 
--impersonate-service-account=yyyy...@sojern-platform-dev.iam.gserviceaccount.com
 
auth print-access-token)" \

--data '{

"pageSize": 10,

"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'

"

}'

The service account has domain wide access to the google ads api. 

Do any special permissions need to be given to the impersonating account?

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/bf0331e2-891f-4806-b847-6beef75ab1ffn%40googlegroups.com.

Reply via email to