<aside> <img src="notion://custom_emoji/22cdfe26-c4cc-4a90-b9fd-de1c57a561ac/14ed7cb3-d76c-809a-8bc2-007a409b7fa6" alt="notion://custom_emoji/22cdfe26-c4cc-4a90-b9fd-de1c57a561ac/14ed7cb3-d76c-809a-8bc2-007a409b7fa6" width="40px" /> TABLE OF CONTENTS
</aside>
<aside> <img src="notion://custom_emoji/22cdfe26-c4cc-4a90-b9fd-de1c57a561ac/134d7cb3-d76c-8047-bfd3-007a2861e4d7" alt="notion://custom_emoji/22cdfe26-c4cc-4a90-b9fd-de1c57a561ac/134d7cb3-d76c-8047-bfd3-007a2861e4d7" width="40px" /> DOCS | This documentation is frequently updated to improve clarity and keep up with the latest changes in the package. Please make sure to read everything carefully to ensure a smooth installation and setup experience. If something feels unclear or doesn’t work as expected, feel free to reach out or check back for updates!
</aside>
Open your browser and go to: https://console.cloud.google.com/. (I’m assuming that you’ve already created a Google account and are signed in. )
Click the project dropdown in the top-left corner (next to the Google Cloud logo).
Choose an existing project, or click “New Project” to create a new one.
Give it a name and click Create.
After it’s created, make sure the project is selected.
In the top navigation bar, try to type “Gmail” and choose the Gmail API from the search results.
Click the “Enable” button. This gives your project access to the Gmail API.
After enabling the API, go to Credentials page
Create OAuth client ID, You’ll be prompted to configure the OAuth consent screen:
— Choose application type (e.g., Web application).
— Enter a name for your credentials.
— Under Authorized redirect URIs, add your redirect URL (https://your-domain.com/mail/oauth/callback/google).
<aside> ⚠️
Important Make sure to define your Authorized redirect URI correctly. This is the URL Google will redirect to after the user grants access. This must exactly match the redirect URI used in your application, otherwise authentication will fail.
**https://your-domain.com/mail/oauth/callback/google**
</aside>
You now have:
— A Google Cloud project with Gmail API enabled
— OAuth 2.0 credentials ready to use in your app
Now we have Client ID and Client Secret, this credential we will use Installation section