Reputation: 11
We have a live application that gives the "The API developer key is invalid" intermittently.
The normal flow:
But for some users, after selecting a user in point 3 (or automatically if there is only one user) the Picker dialog doesn't open, but gets prompted with an "In order to select an item from your online storage, please sign in" message on black background with red Sign in button on it. (see screenshot)
Then after clicking "Sign in", the user receives the "The API developer key is invalid" error message, and the flow stops. (see screenshot again)
For the majority of the users everything works fine. Seems to be a per user issue, because we have an affected user that has multiple gmail addresses signed in into Chrome, and this issue happens with one email address, but doesn't happen with the other.
Any ideas?
Upvotes: 0
Views: 1238
Reputation: 11
After a long search, I found a workaround. I had to replace the gapi.auth2.init
and gapi.auth2. signIn
calls with gapi.auth2.authorize
and it started to work for those affected users too. Submitted a report to Google about it, but at the time of writing, there was not much reply: https://github.com/google/google-api-javascript-client/issues/613
Upvotes: 1