OAuth2Exception with invalid_grand

44 views
Skip to first unread message

adwapi.s...@gmail.com

unread,
Oct 24, 2016, 1:58:50 PM10/24/16
to AdWords API Forum
Hello, dear supports!

I've had a good application, that worked well about 1 year. But a few weeks ago it started to response OAuth2Exception with message { "error" : "invalid_grant" }.
I updated lib to latest version v201609, created new credentials and got new refresh token, but error still same.
What can be cause?

Shwetha Vastrad (AdWords API Team)

unread,
Oct 24, 2016, 2:32:06 PM10/24/16
to AdWords API Forum
Hi,

What app type are you using to generate your OAuth2 credentials? The invalid_grant error occurs when the provided authorization code or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request or was issued to another client. You need to follow this guide to set up the authorization correctly. You may also refer to this link for more information.

Regards,
Shwetha, AdWords API Team.

adwapi.s...@gmail.com

unread,
Oct 25, 2016, 9:28:45 AM10/25/16
to AdWords API Forum
Thank for response, Shwetha

You helped me, I found an issue in my app. I got new refresh token, put it in auth.ini, but forgot, that token is reassigned during app processing (in my app token should be changed in other file).
Thank you again and sorry for waisting your time :)

понедельник, 24 октября 2016 г., 21:32:06 UTC+3 пользователь Shwetha Vastrad (AdWords API Team) написал:

Shwetha Vastrad (AdWords API Team)

unread,
Oct 25, 2016, 10:12:52 AM10/25/16
to AdWords API Forum
Hi, 

No worries at all. Glad that I could help. 

Best,
Shwetha, AdWords API Team.
Reply all
Reply to author
Forward
0 new messages