Obtaining an API key for the Gmail API
This tutorial demonstrates how to create a project in the Google API console and enable the Gmail API. This tutorial covers both creating your application as well as retrieving your OAuth 2.0 client ID and client secret.
Steps to follow:
- Sign in to the Google Cloud console - https://console.developers.google.com/
- Select your Google's project (or create a new one)
- Search for the Gmail API and enable it
- On the main menu, select "APIs & Services" then "Credentials"
- Now create credentials with the "OAuth client ID" method
- If you don't have one, you'll have to configure an OAuth consent screen. Inside the OAuth consent screen configuration, make sure that "bearer.sh" is listed in the "Authorized domains"
- Now, back to create an OAuth client ID page, select "Web application"
- In the Authorized redirect URIs, paste the following URL - https://int.bearer.sh/v2/auth/callback
- Click on "Create" and that's it!