Skip to content
Mint Service Desk Documentation centre

Oauth2

Connect a mailbox using provider-issued tokens instead of storing the mailbox password. Configure the application credentials, permissions and redirect addresses.

OAuth2 grants mailbox access using tokens issued by the provider, without storing the mailbox password in the application. Providers such as Gmail and Yahoo recommend this method.

NOTE: It is recommended to perform the configuration in your browser’s incognito/private mode. For example, in Office 365 configuration the final step requires you to authorize your Microsoft account. Otherwise, if you are signed in to a Microsoft account in your browser with the “stay signed in” option enabled (for example, through Outlook or OneDrive in the browser), the system may incorrectly use those credentials to authorize the connection.

Requirements for a successful OAuth2 connection

To ensure correct configuration, the user or administrator must:

  • possess an active mailbox with one of the supported providers
  • register the Mint Service Desk application with the email provider
  • obtain the Client ID and Client Secret
  • configure a valid Redirect URI pointing to Mint Service Desk (visible in the upper right section of the OAuth2 tab, for example https://mintsd.opgksoftware.com/admin/channels/accounts/create)
  • enable necessary API services if required (e.g., Gmail API)
  • ensure IMAP is enabled in the mailbox (if used for email retrieval)
  • verify that firewall/network settings do not block email communication
  • ensure the user grants consent during authentication using a browser pop-up flow

Details on Credentials authentication support, as well as SMTP and IMAP server parameters for specific email providers, are provided in the Credentials section of the Email chapter in this documentation.

To connect to an email account using OAuth2, select ‘OAuth2’ in the ‘Authorization type’ section. Depending on the previously selected operator, the data will be filled in accordingly (if the ‘Other’ option is selected, the user must enter all the data himself).

Below is a table describing each field using the Others provider as an example.

FieldDescription
Authorization typeSelected authentication method – in this case OAuth2.
Client ID*Unique identifier of the application assigned by the email provider (e.g., Google, Yahoo).
Client Secret*Application secret: a confidential key used to authorize the application during token exchange.
Authorization server*URL of the authorization server responsible for user login and issuing the authorization code.
Access token server*URL of the token endpoint where the Access Token and Refresh Token are obtained.
Scopes*Permission scopes requested by the application; these must allow mail access (send/read).
Send server address*SMTP server address used to send outgoing messages.
Send server port*SMTP port (typically 465 or 587).
Security (SMTP)Connection security method for SMTP (SSL/TLS or STARTTLS).
Receive protocol*Mail retrieval protocol: IMAP (recommended) or POP3.
Receive server address*IMAP/POP3 server address used for incoming mail.
Receive server port*Incoming mail server port (e.g., IMAP: 993).
Security (IMAP/POP3)Security settings for the mail retrieval connection (SSL/TLS).
Email address*Email address of the user whose mailbox is integrated with the system.
Additional addressesOptional aliases for additional addresses that should also receive mail.

After saving, the Redirect URL changes from the ‘create’ endpoint to an ‘edit’ endpoint containing the account’s UUID. Add this URL to the application’s redirect settings in your OAuth2 provider’s portal.