Tuesday 24 November 2015

Re: Invalid grant when using Token Refresh

Hi,

In the case of the account where you confirmed it says you have access, did you retry the request to get a new access token, and if so, how many times and after waiting how long?

Also, just in case it's relevant, could you let me know which client library you're using (if any)?

Thanks,
Josh, AdWords API Team

On Tuesday, November 24, 2015 at 9:36:00 AM UTC-5, jnewman0817@gmail.com wrote:
We have had a couple cases where the account is over a year old so that could be a reason for those. However, we had an account yesterday made and today we go to refresh and it failed with invalid grant. I checked  https://myaccount.google.com/ -> Connected apps & sites -> Manage apps and it says we have access to there Google Adwords and we are allowed to manage there adwords campaigns with authorization date of Yesterday, 1:36 PM. As far as I can tell none of the accounts that we have fixed by re-authorizing have had any problems. 

On Friday, November 20, 2015 at 2:29:20 PM UTC-5, Josh Radcliff (AdWords API Team) wrote:
Hi,

Is it possible that you are seeing a large # of invalidated refresh tokens because they have not been used for 6 months?

If that does not explain the invalid grant errors:

1. Could you let me know if this error has occurred again on any accounts where you generated a new refresh token?

2. Once you get an invalid grant error for a given account, are you able to check the status of the grant via https://myaccount.google.com/ -> Connected apps & sites -> Manage apps? I'd be curious to know what you see there in this case. Below is what that page will look like for an account that has granted access to a project named My AdWords Web Project.



Thanks,
Josh, AdWords API Team

On Friday, November 20, 2015 at 11:08:38 AM UTC-5, jnewm...@gmail.com wrote:
Well that certainly can't be the problem because we don't get new refresh tokens except when we oauth an account. Our process goes as follows: Oauth an account which gives us an access and refresh token. We use the access token till it expires and then use the refresh token to acquire a new access token. If the account starts to show "invalid grant" we oauth again and get a new access and refresh token. This is vicious cycle is causing our app to break for many clients when "invalid grant" occurs.

On Tuesday, November 17, 2015 at 4:48:16 PM UTC-5, Umesh Dengale wrote:
Hello,

There is currently a limit of 25 refresh tokens per user account per client. Please check out token expiration section from the Using OAuth 2.0 to Access Google APIs guide for more details.

Regards,
Umesh, AdWords API Team.

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
 
You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscribe@googlegroups.com
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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/e8669f82-de99-4bc7-8c82-a9276a92a396%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment