Skip to content

Latest commit

 

History

History
112 lines (60 loc) · 5.08 KB

Register the application.md

File metadata and controls

112 lines (60 loc) · 5.08 KB

Register the application

Gmail API Registration

The screens may look different depending on the order of your actions and whether you've worked with Google Console previously, but the simplest flow is as follows:

  1. Go to https://console.cloud.google.com/ and hit Create or select a project.

Welcome screen

Give it a name, skip the organisation field.

Project creation screen

  1. Now we need to configure OAuth Consent Screen. With the project selected go to APIs & Services > OAuth consent screen on the sidebar.

Project dashboard

Choose External user type.

User type screen

Fill in the app name and contact information.

Consent screen

  1. Next is an important step of selecting what type of data the application is allowed to access. At the following screen select Add or remove scopes.

Scopes screen

You may select appropriate scopes from the list, or just type in manually "https://mail.google.com", "email", and "profile", separated by commas.

Scopes selection screen

  1. This is not strictly necessary but you may want to add your email address as a test user. Then you can leave the app in testing mode (no actions required) but Eppie will only be able to authenticate with the test user account.

Adding test users

If you skip the above step, then you will need to switch to production mode. Go to APIs & Services > OAuth consent screen again and Publish app.

Publishing the app

Later whenever you are authenticating with Eppie-CLI at you Gmail account, you will get a warning from Google that the application has not been verified. Despite the warning you will be able to continue with the authentication by chosing Advanced dropdown.

Warning

  1. Lastly, create the application credentials. Go to APIs & Services > Credentials > Create credentials > OAuth Client ID.

Credentials screen

And you are done. Pass the Client ID and Client secret as arguments when launchig Eppie-CLI from the console as described here.

Microsoft Outlook API Registration

  1. Go to Azure Portal and log in or create an account. Choose Microsoft Entra ID on the dashboard or in the side menu. Here we will register Eppie-CLI so Microsoft's servers recognize it and allow it to access your Outlook mailbox.

Azure portal

  1. Select App registrations > New registration.

App registration

Fill in the name, select the third option for the Supported account types: Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox).

Also, add a redirect URI: choose Public client/native (mobile & desctop), type in http://127.0.0.1.

Hit Register.

Application forml

You will need the Application (client) ID later when running Eppie-CLI.

Overview

  1. Now let's set API permissions. These will be requested on the user consent screen when you log into your mailbox with Eppie. Hit API permissions > Add permission.

API permissions

Choose Microsoft Graph from the side menu.

Microsoft Graph

Select Delegated permissions. Eppie needs permissions to read and write into your mailbox, send new emails and see your profile. Look for theses checkboxes:

OpenId permissions > offline_access,

OpenId permissions

IMAP > IMAP.AccessAsUser.All,

IMAP permission

SMTP > SMTP.Send,

SMTP permission

and User > User.Read

User permission

And this is it. Now you can pass the application ID to Eppie-CLI as an argument as shown here, and it will be authorized to access your Microsoft Outlook mailbox.

See Also