Setting up Email Service

  1. Navigate to the Google Cloud Platform console and click on your project/create a new project.
  2. Navigate to “APIs & Services” on the left pane and click on Credentials. image

  3. Click “Create Credentials” with OAuth Client ID option, and fill in the form (set user type to internal)
  4. Navigate back to the Credentials page and click Create Credentials again with OAuth Client ID option. Select “Web Application” and set “Authorised Redirect URIs” to https://developers.google.com/oauthplayground image

  5. Click Create and keep the Client ID and secret given.

  6. Navigate to https://developers.google.com/oauthplayground and click settings. Check off “Use your own OAuth credentials” and fill in the Client ID and secret from Step 5. image

  7. In the box labelled “Input your own scopes” type https://mail.google.com/ and click Authorize APIs. image

  8. Click the account you want to use to send emails and grant email permissions.

  9. Click “Exchange authorization code for tokens”. image

  10. Keep the refresh token given.

  11. Navigate to the Google Cloud Platform console -> APIs & Services -> Library -> Gmail API, and click Enable. image

  12. Add the refresh token, client ID, and client secret from above to the root .env file. Also add the address of the mailing account.
    MAILER_USER=<insert-email-address>
    MAILER_REFRESH_TOKEN=<insert-your-token>
    MAILER_CLIENT_SECRET=<insert-your-secret>
    MAILER_CLIENT_ID=<insert-your-id>
    
  13. If you are using Python with auth, please update line 26 in backend/python/app/rest/auth_routes.py, as well as line 25 in backend/python/app/rest/user_routes.py to be your desired display name.