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

# Snapchat

> Connect your AI agent to a user's Snapchat account to share content like photos, videos, and links.

Connect your AI agent to a user's Snapchat account to share content like photos, videos, and links.

## Connect Snapchat to Auth0

**1. Snapchat setup**

1. Visit the [Snapchat Developer account](https://developers.snapchat.com/) page and sign up.
2. Navigate to the [Snap Kit Portal](https://developers.snap.com/snap-kit/home) and create a new app in the Snapchat Developer Portal.
3. You will need to pick the libraries you plan to use: Login Kit is required at the minimum. Ensure **Login Kit** is enabled for your app.
4. Generate a Confidential OAuth 2.0 Client ID and Client Secret and note:
   * **Client ID**  (OAuth client\_id)
   * **Client Secret** (OAuth client\_secret)
5. Configure Redirect URIs:

   * **Redirect URL**: `https://YOUR_AUTH0_DOMAIN/login/callback`

   You can find the **Auth0 domain** in the [Auth0 Dashboard](https://manage.auth0.com/).

   You can find this under **Applications > \[Your Application] > Settings > Basic Information > Domain**.

   If you are using the [custom domains](https://auth0.com/docs/customize/custom-domains.md) feature, your Auth0 domain is the custom domain. You can find this under **Branding > Custom Domains**.

   Snapchat requires HTTPS for redirect URIs.
6. Select the Login Kit scopes:
   * `https://auth.snapchat.com/oauth2/api/user.display_name` - For user's display name
   * `https://auth.snapchat.com/oauth2/api/user.external_id` - For a unique user ID
   * `https://auth.snapchat.com/oauth2/api/user.bitmoji.avatar`- Optional, for Bitmoji
7. In the left hand panel, navigate to **Versions > \[Your App Name]**, scroll to the **Login Kit** section and add your **Redirect URIs**.

To learn more about setting up Snapchat, read the [Login with Snapchat documentation](https://developers.snap.com/snap-kit/login-kit/overview).

**2. Auth0 setup**

<ol>
  <li>In the [Auth0 Dashboard](https://manage.auth0.com), go to
  **Authentication > Social**.</li>
  <li>Select **Create Connection**, then choose **Snapchat**.</li>
  <li>Select **Continue**.</li>

  <li>
    In **General**:

    <ol type="A">
      <li>Enter the **Client ID** and **Client Secret** from
      your Snapchat OAuth app.</li>

      <li>
        Under **Attributes**, select the scope(s) required for your
        application. These determine what permissions your application can
        request from Snapchat, whether for authentication (such as
        accessing basic profile details) or for API access (such as
        connecting to the provider's APIs).

        For a Dropbox and Google social
        connection, you must select **Offline Access** in the Auth0 Dashboard, enabling
        the client application to obtain an Auth0 refresh token.
      </li>

      <li>Add any additional scopes your application requires in the
      **Additional Scopes** field.</li>
    </ol>
  </li>

  <li>In **Purpose**, toggle on **Connected Accounts for Token Vault**. This lets the
  connection retrieve and securely store access tokens for external
  APIs. Learn more in
  [Connected Accounts for Token Vault](https://auth0.com/docs/secure/call-apis-on-users-behalf/token-vault/connected-accounts-for-token-vault.md).</li>
  <li>Select **Create**.</li>

  <li>
    After creation, you are redirected to the **Applications** page.
    Select the application(s) to enable this connection for.

    In a new Auth0 tenant, you can select the **Default App**.
  </li>

  <li>Once you have created your Snapchat social connection, [test your connection](https://auth0.com/docs/authenticate/identity-providers/test-connections.md) to ensure the setup is working correctly before using it in your application.</li>
</ol>

This guide walks you through setting up the **Snapchat** connection in Auth0.
For an end-to-end example that shows how to set up your app to call third-party APIs on the user's behalf
using a connection like this, read the
[Call third-party APIs on user's behalf quickstart](https://auth0.com/ai/docs/get-started/call-third-party-apis-on-users-behalf.md).

## Token Vault configuration example

To configure the Token Vault for your Snapchat connection, you can use the following code snippet in your application:

**JavaScript**

**Python**

## Next steps

* To learn how to configure applications to access Token Vault, read [Configure Token Vault](https://auth0.com/docs/secure/call-apis-on-users-behalf/token-vault/configure-token-vault.md).
* If your application uses [Organizations](https://auth0.com/docs/manage-users/organizations.md), authenticate the user with the target organization before initiating the Connected Accounts flow. Connected accounts remain linked to the individual user profile.
* To learn how to get an access token to make a tool call, complete the [Call third-party APIs on user's behalf Quickstart](https://auth0.com/ai/docs/get-started/call-third-party-apis-on-users-behalf.md).
