Diiscord Diiscord - 2 years ago 282
Android Question

Android [GetToken] GetToken failed with status code: UNREGISTERED_ON_API_CONSOLE

I developped an application that uses gmail api to get all the mails sent by the user. Then I divided this app in a sample (almost empty) and a fragment that does everything, so I can later integrate my fragment easily in my team's project's settings.

This project uses firebase so I'm following this tutorial to connect to Gmail from this project just with my fragment.
I developped my fragment with the Gmail Quickstart so I have a GoogleAccountCredential but when I try to use the GoogleAccountCredential.getToken method, i have the following error :

[GetToken] GetToken failed with status code: UNREGISTERED_ON_API_CONSOLE

I've created new credentials from the Google API console with the right package name.

What did I do wrong ?

Answer Source

I answered this in my other post here

Looks like when I create credentials keys in the API manager Google console, it doesn't add the SHA1 keys in all the apps of the project in Firebase.

All I had to do (after a week of hard work) was to copy paste the SHA1 from tha app "linked" to the Google API console in the other app

I hope it can help

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download