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=yyy...@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?
|
||||||