Anthony Elliott
Anthony Elliott

Reputation: 3011

What defines a client/user pair for Google API refresh tokens?

According to Google, there is a limit (currently 25) of how many refresh tokens can be given per client/user pair.

Just to clarify, this is referring to each user, right? Meaning that if I have a million users (!) each user could have 25 refresh tokens active? Or does this mean that I only 25 of the one million users are able to store refresh tokens on my server?

I am referring to the bottom of this page: https://developers.google.com/analytics/devguides/config/mgmt/v3/mgmtAuthorization#helpme

Upvotes: 1

Views: 136

Answers (1)

Linda Lawton - DaImTo
Linda Lawton - DaImTo

Reputation: 117026

Ok trying to figure out how to explain this:

When a user says yes they will allow your application to access there data you get a refresh token. You should save this refresh token some place so that you can use it next time. Then you will never have to ask the user to authenticate you again.

But if for some reason you ask the user again can I access your data you will get another refresh token. The first refresh token is still good you can still use that to access there data. You can do this up to 25 times before the first one gets deleted.

Here is a real life example of when this can be a problem:
I have an SSIS connection manager that asks the user if i can access there Google Analytics data. (works with a datareader but i digress). I have run into a problem where the user has to many packages authenticated. Basically they installed my application to many times in testing and the first one stopped working.

In the end i just recommended that they have a dedicated account for using my Task that way they would reduce the change of hitting the 25 authentications.

Upvotes: 2

Related Questions