> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cardclan.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect Gmail via OAuth (1-Click)

> Send CardClan cards directly from your Gmail address using secure 1-click OAuth authentication — no passwords or app passwords required.

## Overview

CardClan supports connecting your **personal Gmail** account via OAuth 2.0. Once connected, all cards you send will arrive in your recipient's inbox **from your Gmail address**, improving deliverability and personalisation.

<Info>
  This uses Google's secure OAuth 2.0 flow. CardClan never stores your Gmail password — only an encrypted access token.
</Info>

## Prerequisites

Before connecting, make sure:

* You have a **Gmail account** (e.g. `yourname@gmail.com`)
* You are **logged in to CardClan**
* Pop-ups are **allowed** in your browser for CardClan (required for the OAuth popup window)

## Step 1: Go to Email Settings

1. Log in to [CardClan](https://app.cardclan.io)
2. Click your profile icon or workspace name in the top navigation
3. Go to **Settings → Email Accounts**

## Step 2: Connect Your Gmail Account

1. Scroll down to the **One-Click OAuth Connections** section
2. Click the **Connect Google** button

<img src="https://mintlify.s3.us-west-1.amazonaws.com/cardclan/help/images/oauth-connect-google.png" alt="Connect Google Button" />

3. A Google sign-in popup will appear
4. Select the Gmail account you want to connect

<img src="https://mintlify.s3.us-west-1.amazonaws.com/cardclan/help/images/oauth-google-account-select.png" alt="Google Account Selector" />

5. Review the permissions and click **Allow**

<Warning>
  CardClan requests the `https://mail.google.com/` scope. This is required by Gmail's SMTP OAuth2 protocol to send emails on your behalf. CardClan only uses this permission to send cards — it does not read, delete, or modify your emails.
</Warning>

## Step 3: Confirm the Connection

After clicking Allow, the popup will close automatically and your Gmail address will appear under **Connected OAuth Accounts** with a green **Google** badge.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/cardclan/help/images/oauth-gmail-connected.png" alt="Connected Gmail Account" />

## Step 4: Send a Card

From now on, when you send a card:

* CardClan will automatically use your connected Gmail address as the **From** address
* No extra configuration is needed — it works automatically for all scheduled and instant sends
* If your token expires, CardClan silently refreshes it in the background

## Disconnecting

To remove the Gmail connection:

1. Go to **Settings → Email Accounts**
2. Find your Gmail under **Connected OAuth Accounts**
3. Click **Disconnect**

Your account will be removed and cards will fall back to the default CardClan sending address.

## Troubleshooting

<AccordionGroup>
  <Accordion title="The popup opens but closes immediately (white screen)">
    Make sure pop-ups are allowed for CardClan in your browser settings. In Chrome: click the address bar lock icon → Site settings → Pop-ups and redirects → Allow.
  </Accordion>

  <Accordion title="I see 'Access Denied' or 'App not verified'">
    CardClan's Google OAuth app may still be pending Google verification. If you are on a test/staging environment, ask your CardClan admin to add your email as a test user in the Google Cloud Console.
  </Accordion>

  <Accordion title="My Gmail is connected but cards are still sent from CardClan's default address">
    Try disconnecting and reconnecting your Gmail account to refresh the token. If the issue persists, contact support.
  </Accordion>
</AccordionGroup>

<Info>
  [Contact us](mailto:hello@cardclan.io) if you have any questions or run into issues. We're happy to help!
</Info>
