Documentation
Zach Schneider edited this page Apr 21, 2021
·
1 revision
- Go to the Google Cloud Console and create a new project.
- Give your project a name, and click Create. Wait for your project to be created.
- Click the Create credentials dropdown and choose OAuth client ID
- You may be asked to configure the OAuth consent screen
- Set the Application name
- Add your domain to the Authorized domains list
- Configure any other option as you like. More info here.
- Select Web application as the Application type, and give it a name.
- Copy the Authorized Redirect URI from the backend Gmail configuration page.
- Add that URI as an Authorized redirect URI and click Create
- Look for your new credential in the OAuth 2.0 Client IDs table, and click the download button to download your credentials in JSON format.
- Click on Library in the sidebar and search for "Gmail". Click Enable to enable access to the Gmail API.
- Upload the file you downloaded to the backend Gmail configuration page and save the settings. Reload the page to show the Authorize button.
- Click the Authorize button to open the Google consent page. Continue to select the account you want to send email with and consent to sending email on your behalf.
- You may encounter a screen that says "This app isn't verified". This is referring to the OAuth consent screen that you created, and can be bypassed by clicking Advanced and then Go to <domain> (unsafe).