---
title: "Configuring OAuth"
slug: "configuring-oauth"
abstract: "Learn how to configure CustomSMTP with OAuth."
---
# Configuring OAuth

To configure `CustomSMTP` with OAuth:

1. Fill in the `Sitecore.EDS.Providers.CustomSMTP.OAuth.config` file with [the appropriate settings](https://doc.sitecore.com/xp/en/developers/exm/103/email-experience-manager/the-exm-configuration-settings.html "The EXM configuration settings").
2. In the `Sitecore.EDS.Providers.CustomSMTP.config` file, change `"authenticationMethod"` to `“OAuth”` .

    > [!note]
    > When `"authenticationMethod"` is `"OAuth"`, then `"password"` is not used.

3. In Email Experience Manager, in the left-hand menu under **Administrator**, click **SMTP Authentication**.
4. On the **SMTP Authentication** page, click **Authenticate**.

    The OAuth token is saved in the `Tokens` item. When authentication has completed, a notification message is displayed.

5. To see the OAuth token. open File Explorer, and go to **System**, **Settings**, **Email**, **System**, and click **Tokens**.

The token item contains information about:

- An access token (a value, an expiration date, a lifetime in seconds, and a reserved time in seconds)
- A refresh token (a value)