Gmail API
Guide how to get Gmail API and set it in Encore
1. Create a Google Cloud project and enable Gmail API
1. Open Google Cloud Console
2. Create or select a project
3. Go to APIs & Services → Library
4. Enable “Gmail API”
2. Configure OAuth consent screen
1. APIs & Services → OAuth consent screen
2. Choose User type:
Internal (workspace only)
External (most common)
3. Fill in required app info
4. Add scopes. Add: -`.../auth/gmail.modify`
5. Add test users
3. Create OAuth client credentials
1. APIs & Services → Credentials
2. Create Credentials → OAuth client ID
3. Pick an application type: Desktop app
4. Download the client configuration (JSON)
4. Place file in the \other\gmail\ folder.
\other\gmail\ folder.Rename the downloaded file to client_secret_email.json (email is the part of the email address before @). Than place file in the Encore\other\gmail\ folder.

5. In the IMAP settings, set ImapHost to gmail_api.
gmail_api.ImapEmail: enter the account’s email address
All other fields are not required and can be left empty.

Last updated