Problem
Sometimes you might get the following error while making Google Ads API calls using JSON Source.
The remote server retumed an error: (403) Forbidden. Response Url: https://googleads.googleapis.com/v9/customers:listAccessibleCustomers Status Code: Forbidden Response Body: { "error": { "code": 403, "message": "Request had insufficient authentication scopes.", "status": "PERMISSION_DENIED", "details": [ { "@type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "ACCESS_TOKEN_SCOPE_INSUFFICIENT", "domain": "googleapis.com", "metadata": { "service": "googleads.googleapis.com" "method": "google.ads.googleads.v9.services.CustomerService.ListAccessibleCustomers", } } ] } }
Possible Cause
- Desired Scope is missing while you generate the token. API requires authorization, specifically it requires that the user be authorized using the API-specific scope while you generate the token.
- You denied Access while generating the Token.
- Access Token is expired while you make the API Call.
Possible Solutions
- Please check that in the OAuth Connection you have passed the API-specific scope before you generate the token. e.g. For Method: customers.
listAccessibleCustomers below scope is required.Authorization Scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/adwords
- Make sure to allow access to PowerPack, while you generate the token allow the Access.
-
It may be possible that the access token is expired if you are not using Offline access.
Please refer to below link for the same.
https://developers.google.com/google-ads/api/docs/oauth/internals#offline_accessIt's common for a Google Ads API client app to request offline access. For example, your app may want to run batch jobs when your user is not physically online browsing your website.
To request offline access for a web app type, make sure you set the
access_type
parameter tooffline
. You can find additional information in Google's OAuth2 guide.Please set the below extra attributes in the advanced tab Auth Request, generate the token again and allow the access and try to make the call:
access_type=offline&include_granted_scopes=true&prompt=consent
Contact Us
If you have more question(s) feel free to contact us via Live chat or email at support@zappysys.com
Comments
0 comments
Please sign in to leave a comment.