error: invalid_client after after GetRefreshToken.php

38 views
Skip to first unread message

Marc

unread,
Jan 15, 2016, 8:56:35 AM1/15/16
to AdWords API Forum
Hello

I'm hoping someone can help with an issue we're having with AdWords API (PHP).

We already have AdWords API setup and running on our system for quite sometime, however we have decided to change the account it was associated with.

I have created a new project in API Manager on Google Cloud for the account we want to use, and added OAuth2 client credentials.

The client_id and client_secret credentials were then added to auth.ini.

GetRefreshToken.php was then run which gave a URL. After going to the URL and granting permission it gave an access code. This was then put in to the Refresh CLI as requested.

However, it returns with the following error:

Your OAuth2 Credentials are incorrect.
Please see the GetRefreshToken.php example.
{
 
"error" : "invalid_client"
}


The account has been added as Admin to our MCC.
The developerToken is from our MCC account, and userAgent matches the oAuthClient Name.

I've tried multiple times with different variations of settings but it hasn't worked.

Any help would be appreciated.


Yin Niu

unread,
Jan 15, 2016, 10:10:03 AM1/15/16
to AdWords API Forum
Hi, 

When you paste the url to the browser to get authorization code, make sure you log in as the user that you want. So in the auth.ini file, you will have a new refresh token and new client id/secret. 

Thanks,
Yin, AdWords API Team. 
Reply all
Reply to author
Forward
0 new messages