Hi there,

Thanks for reaching out to the Google Ads API Forum.

I can see that you have encountered AUTHENTICATION_ERROR error. This could 
potentially be using the wrong developer token for your API request. Could you 
please double check if you’re sending the correct developer token for your API 
request? If you’re indeed sending the exact same developer token that was 
copied from MCC account’s API center, and still encountering it, then I request 
you may provide us with the complete logs in the format of the request and 
response logs along with the request-id, as seen in their respective links.

Once you are able to get the exact same developer token that was copied from 
MCC account’s API center, then you may use it in your CURL, and double check if 
empty space is not added. Then retry your request.

For REST interface requests, you can enable logging via the curl command by 
using the -i flag. This will cause the tool to include the HTTP response 
headers in the output. Kindly provide the complete logs via reply privately to 
author option.

However, a sample CURL request you may try below:

curl -f --request POST 
"https://googleads.googleapis.com/v12/customers/${CUSTOMER_ID}/googleAds:searchStream";
 \

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

--header "developer-token: ${DEVELOPER_TOKEN}" \

--header "login-customer-id: ${MANAGER_CUSTOMER_ID}" \

--header "Authorization: Bearer ${OAUTH2_ACCESS_TOKEN}" \

--data '{

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

"

}'



For your question “ Am I missing any step to access the Google Ads REST API? Is 
it possible that the REST API is not enabled somehow?”, you may check this page 
for the steps in REST API, and it is enabled for everyone as long as you have 
valid credentials for API calls.

Let us know how this goes on your end.

Regards,

Yasar
Google Ads API Team
ref:_00D1U1174p._5004Q2haQpn:ref

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/mgMAt000000000000000000000000000000000000000000000RO2G1A002Av4ZhzfRIqjXs6AXsuXPA%40sfdc.net.
  • Ca... Errors4l
    • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum

Reply via email to