I received the correct response in the same request before, why is the
error returned? Isn't the Google Ads API's scope just enough? I can't add
another adwords scope. What should I do?
Request via curl:
POST /v1/customers/4939887x/googleAds:search HTTP/1.1
Host: googleads.googleapis.com
Developer-token: Wo_rsApU2moXgEnxxx
Content-length: 232
Content-type: application/json
Authorization: Bearer ya29.
Gl1cBy0t2s6zFaFeNlmhTUIEf6ha7SzAe43al4M0zZawui1p3mPdS8Ty3bzbGh5TbeFm_r.....
Login-customer-id: 4939887x
"Parameters":
{
"query" : "SELECT campaign.name, campaign.status, segments.device,
metrics.impressions, metrics.clicks, metrics.ctr, metrics.average_cpc,
metrics.cost_micros FROM campaign WHERE segments.date DURING LAST_30_DAYS"
}
Response:
HTTP/1.1 403 Forbidden
Content-length: 138
X-xss-protection: 0
X-content-type-options: nosniff
Transfer-encoding: chunked
Vary: Origin, X-Origin, Referer
Server: ESF
-content-encoding: gzip
Cache-control: private
Date: Tue, 06 Aug 2019 09:17:58 GMT
X-frame-options: SAMEORIGIN
Alt-svc: quic=":443"; ma=2592000; v="46,43,39"
Content-type: application/json; charset=UTF-8
Www-authenticate: Bearer realm="https://accounts.google.com/", error=
"insufficient_scope", scope="https://www.googleapis.com/auth/adwords
https://adwords.google.com/api/adwords
https://adwords.google.com/api/adwords/
https://adwords.google.com/api/adwords/cm
http://adwords.google.com/api/adwords
https://adwords.google.com/api/adwords/email"
{
"error": {
"status": "PERMISSION_DENIED",
"message": "Request had insufficient authentication scopes.",
"code": 403
}
}
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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
"AdWords API and Google Ads 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/17ab440d-47b9-49ec-a647-779ad3d591e7%40googlegroups.com.