Can't get AdWords Campaign info (invalid_grant or USER_PERMISSION_DENIED)

28 views
Skip to first unread message

fp.mm...@gmail.com

unread,
Oct 1, 2018, 2:00:02 AM10/1/18
to AdWords API and Google Ads API Forum
I'm trying to send my very first request to AdWords API (get some info about campaign).
So I setted up:

1. The client id - From Google API console (mcc email used).
2. Secret id - From Google API console (mcc email used).
3. Refresh token - Production MCC account.
4. Developer token - Production MCC account which is in pending approval.
5. Adwords Client customer id of the test account in test manager account.

If I use production MCC refresh token and test client customer account ID I get this error: 
AuthorizationError.USER_PERMISSION_DENIED

If I use test MCC refresh token and test client customer account ID I get this error:
error: 'invalid_grant', error_description: 'Bad Request'

So what do I have to use to get access to AdWords API? 





Peter Oliquino (AdWords API Team)

unread,
Oct 1, 2018, 4:07:11 AM10/1/18
to AdWords API and Google Ads API Forum
Hi,

The OAuth2 credentials you need to use should always be created using an email address which has access to the account (clientCustomerId) that you are making the calls against. In your scenario, using the production MCC OAuth2 credentials for the test MCC account is incorrect. You will need to create a separate set of the OAuth2 credentials (including the refreshToken) exclusive to the test MCC account to avoid the errors you are encountering.

Let me know if this helps.

Thanks and regards,
Peter
AdWords API Team
Reply all
Reply to author
Forward
0 new messages