Some users will auth with oAuth and other accounts will not (random fails)

48 views
Skip to first unread message

Andy

unread,
Oct 16, 2018, 7:40:47 PM10/16/18
to AdWords API and Google Ads API Forum
We've been at it for weeks and can't solve the issue. Some users can auth for our app with no issues, others get the error: 
Something wrong! Error occured while connect with Adwords acccount!Client error: `POST https://oauth2.googleapis.com/token` resulted in a `400 Bad Request` response: { "error": "invalid_grant", "error_description": "Bad Request

We've tried everything we can think of, we can't find any correlation to the accounts that fail and the ones that work. It seems random and without reason. Any help would be greatly appreciated. 

Dannison Yao (AdWords API Team)

unread,
Oct 17, 2018, 1:44:38 AM10/17/18
to AdWords API and Google Ads API Forum
Hi Andy,

According to the OAuth 2.0 documentation, there is currently a limit of 50 refresh tokens per user account per client. If the limit is reached, creating a new refresh token automatically invalidates the oldest refresh token without warning and which is most likely what you're experiencing.

If you need to authorize multiple programs, machines, or devices, one workaround is to limit the number of clients that you authorize per user account to 15 or 20. If you are a Google Apps admin, you can create additional admin users and use them to authorize some of the clients.

Sincerely,
Dane
AdWords API Team
Reply all
Reply to author
Forward
0 new messages