# Create your Mailrelay connection

{% hint style="info" %}
**Oauth connection**: The first step is to install GearPlug in your account so that GearPlug may access the data.
{% endhint %}

To create your Mailrelay Plug, you’ll need the URL and API Token. You can get these from your Mailrelay account, following the instructions below.

### Set up access

1. **Head over to “My Apps”** in the upper-right corner of your GearPlug interface.

<figure><img src="https://3123789406-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkK5Y5w2yaKLWSjflrdO%2Fuploads%2FbivoX1LXAXHfhHvpnR4j%2F2.png?alt=media&#x26;token=b7628000-ef01-46c0-b044-411240343c63" alt=""><figcaption></figcaption></figure>

2. **Select Mailrelay** on the drop-down menu under “New connection” and click “Create.”

<figure><img src="https://3123789406-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkK5Y5w2yaKLWSjflrdO%2Fuploads%2FuwEglUnMQGyz1ta8G57J%2F3.png?alt=media&#x26;token=3c180a76-7852-4e4a-a3b9-8fb4136fed1b" alt=""><figcaption></figcaption></figure>

3. **Switch into your Mailrelay dashboard and click “API keys”** on the drop-down menu to the left.

<figure><img src="https://3123789406-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkK5Y5w2yaKLWSjflrdO%2Fuploads%2F7NuhMxKtH7ifg2PXyai8%2F4.png?alt=media&#x26;token=33b4e202-d8f1-4f7d-ab4d-fe09616086b1" alt=""><figcaption></figcaption></figure>

4. **Click “+ Add.”** This will make you choose a user for the API token. Pick the user you want to use and click “Create API key.” Under “Token,” you’ll find the code you need.

<figure><img src="https://3123789406-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkK5Y5w2yaKLWSjflrdO%2Fuploads%2FGVKkMw5FfIJLch7OYpoP%2F5.png?alt=media&#x26;token=f18332f0-c7ab-4396-bb0d-8d7c08282c28" alt=""><figcaption></figcaption></figure>

5. **Copy your Mailrelay URL and the API** token you just generated. Paste them in the corresponding fields in your GearPlug dashboard and click “Continue.”

<figure><img src="https://3123789406-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkK5Y5w2yaKLWSjflrdO%2Fuploads%2FLLA2Vh9BmwschNviqN1i%2F6.png?alt=media&#x26;token=ef96b144-fb93-4d7c-b052-473e05438ee4" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
When copying your Mailrelay URL, you just need the name, extension, and “.com:” If you copy any other information, such as “https\://” or whatever comes after “.com,” the connection will trigger an error.
{% endhint %}
