Google Ads API request return as AUHENTICATION_FAILED error

I want to use reporting HTTP endpoints for that I send a request with postman But every time I getting AUTHENTICATION_ERROR.

My oAuth2 response :

{"token":{"access_token":"ya29.a0AfH6SMCyU5L******","refresh_token":"1//09Iryk6eZYKj0CgYIA********","scope":"https://www.googleapis.com/auth/youtube.upload https://www.googleapis.com/auth/youtube.readonly https://www.googleapis.com/auth/adwords","token_type":"Bearer","expiry_date":1624622265323}}

I used "ya29.a0AfH6SMCyU5L******" as access_token for request header.

And my postman request like that:

enter image description here

Where did I make mistake? How can I solve this issue?

Upvotes: 0

Views: 293

Answers (1)

Dave Davis
Dave Davis

Reputation: 968

You really should use the official client libraries that handle all of this. Reporting is explicitly not to be done via REST as they're expensive.

https://developers.google.com/google-ads/api/docs/best-practices/quotas

Get requests Get requests (for example, using the GetCampaign method on the CampaignService), have daily usage limitations separate from the limits on operations, which are outlined in the Access Levels and Permissible Use guide. Unlike daily operations, the limits on get requests do not vary by access level; all developer tokens, including those with Standard Access, are limited to 1,000 get requests per day. Unlike search requests, get requests are expensive because all attribute data is retrieved. Use search instead of get whenever possible.

If you really need to use REST, please post your full code.

Upvotes: 0

Related Questions