FirebaseUser.getIdToken throw FirebaseException

292 views
Skip to first unread message

Vladimir Samoylov

unread,
Jan 17, 2022, 2:22:13 PM1/17/22
to Firebase Google Group
Hi everyone! 
We faced with error
Calling FirebaseUser.getIdToken(forceRefresh = true) throws exception for anonymous user

com.google.firebase.FirebaseException: An internal error has occurred. [ Quota exceeded for quota metric 'Token exchange' and limit 'Token exchange per minute' of service 'securetoken.googleapis.com' for consumer 'project_number:<number hidden>'. ] at com.google.android.gms.internal.firebase-auth-api.zztt.zza(com.google.firebase:firebase-auth@@20.0.3:4) at com.google.android.gms.internal.firebase-auth-api.zzvb.zza(com.google.firebase:firebase-auth@@20.0.3:9) at com.google.android.gms.internal.firebase-auth-api.zzvc.zzk(com.google.firebase:firebase-auth@@20.0.3:1) at com.google.android.gms.internal.firebase-auth-api.zzuz.zzh(com.google.firebase:firebase-auth@@20.0.3:25) at com.google.android.gms.internal.firebase-auth-api.zzub.zza(com.google.firebase:firebase-auth@@20.0.3:20) at com.google.android.gms.internal.firebase-auth-api.zzb.onTransact(com.google.firebase:firebase-auth@@20.0.3:3) at android.os.Binder.execTransactInternal(Binder.java:1184) at android.os.Binder.execTransact(Binder.java:1143)
Who can help to figure out can we increase the limit?

Kato Richardson

unread,
Jan 18, 2022, 1:21:11 PM1/18/22
to Firebase Google Group
You need to make less requests. Is there any reason you need forceRefresh = true in each call? This is likely unnecessary and removing it should free up some quota.

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/b631c2ea-a4e1-4d99-a0ae-d427385f3169n%40googlegroups.com.


--

Kato Richardson | Developer Programs Eng | kato...@google.com | 775-235-8398

Ajaz Ahmed

unread,
Jan 19, 2022, 5:09:05 PM1/19/22
to fireba...@googlegroups.com

I had the same error; solved it by:

  1. Going to https://console.developers.google.com/apis/credentials,
  2. Clicking on the API key
  3. Enabling the "Token Service API", along with "Identity Toolkit API"

--
Reply all
Reply to author
Forward
0 new messages