0

Dear fellow developers,

I've found in the documentation for the google calendar api that there is a limit of 50 (valid) refresh tokens per account per client. I was wondering if there is a way to increase this (maybe with buying some obscure google license) or if there is a not too messy workaround for it.

The application I'm building would update a user's calendar without user input. I thusly can't have it request permission everytime the user's refresh token is no longer valid because of an amount limit.

I noticed one account can create multiple clients to remove the 50 limit but google also states there is still a limit of tokens across all clients.

If I explained my problem badly please let me know. Thanks!!

Jinse
  • 63
  • 1
  • 8
  • Is [this](https://developers.google.com/google-apps/calendar/pricing) the page you are looking for? – Guillaume CR Mar 09 '17 at 19:45
  • As for as I can tell this only applies to the amount of queries an app can send. Not the amount of refresh token it will remember. Useful, but not t what I'm looking for – Jinse Mar 09 '17 at 20:57

1 Answers1

0

Yes, there is currently a limit of 50 refresh tokens per user account per client. And if this 50 limit is reached the new created token will automatically invalidates the oldest token without warning.

According to this documentation, there is also a larger limit on the total number of tokens a user account or service account can have across all clients. Most normal users won't exceed this limit but a developer's test account might.

So 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 G Suite admin, you can create additional admin users and use them to authorize some of the clients.

For more information, check this SO question.

Community
  • 1
  • 1
KENdi
  • 7,576
  • 2
  • 16
  • 31