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 ?