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

# Custom Snapchat Ads App

> Connect Snapchat Ads through your own Snapchat OAuth app (white-label) by pasting your client ID, client secret, and a refresh token.

Markifact supports two ways to connect Snapchat Ads: using the built-in **Markifact app** (Quick Connect) or connecting through your own **Snapchat OAuth app** (Custom App). With a custom app, every request Markifact makes to the Snapchat Marketing API runs under your app, so your clients never see Markifact in their Business Manager.

> [!NOTE]
>
> Custom app connections are available on the **Team** plan. See [White-label Connections](https://docs.markifact.com/core-concepts/white-label-connections.md) for the overview.

***

## Quick Connect vs Custom App

| Feature | Quick Connect | Custom App |
| :- | :- | :- |
| **Setup Time** | 1 minute | 15-20 minutes |
| **App the client sees** | Markifact | Yours |
| **API rate limits** | Markifact's app | Your app |
| **White Label** | No | Yes |
| **Plan** | All plans | Team |
| **Best For** | Quick setup, testing | Agencies, strict client requirements |

***

## What You Need

Three values from your own Snapchat OAuth app:

| Value | Where it comes from |
| :- | :- |
| **Client ID** | Your OAuth app under **Business Details** > **OAuth Apps** in the [Snap Business Dashboard](https://business.snapchat.com/) |
| **Client Secret** | The same app (shown once when created) |
| **Refresh Token** | Minted against that app with the `snapchat-marketing-api` scope, by a member of the organization that owns the ad accounts |

Snapchat access tokens last 30 minutes; Markifact refreshes them with your client ID and secret on every run. Refresh tokens stay valid until the user revokes the app.

> [!NOTE]
>
> **Already have your own authorization flow?** If your systems already hold a refresh token issued by your app with the scopes below, skip to [Connect to Markifact](#connect-to-markifact).

### Scopes

Request `snapchat-marketing-api` (required) and `snapchat-profile-api` (public profiles for Spotlight and profile ads) when the user authorizes.

***

## Setting Up Your Custom Snapchat Ads App

**1. Create the OAuth App**

1. Open the [Snap Business Dashboard](https://business.snapchat.com/), go to **Business Details**, and scroll to **OAuth Apps**
2. Click **Add OAuth App**, enter the app name (the branding users see when they authorize), and under **Redirect URI** enter a URL you control (for example `https://www.youragency.com/snapchat-callback`). Snapchat appends the auth code to this URL after authorization; the page does not need to do anything
3. Copy the **Client ID** and the **Client Secret** (the secret is shown only once)

**2. Authorize and Get the Auth Code**

1. Open the following URL in a browser, replacing the client ID and redirect URI:

```bash theme={"dark"}
https://accounts.snapchat.com/login/oauth2/authorize?client_id=YOUR_CLIENT_ID&redirect_uri=https%3A%2F%2Fwww.youragency.com%2Fsnapchat-callback&response_type=code&scope=snapchat-marketing-api%20snapchat-profile-api&state=markifact
```

2. Sign in as a member of the Business Manager organization that owns the ad accounts and click **Continue**
3. Snapchat redirects to your URL with `code=...` in the query string. Copy the value. Auth codes expire quickly and can be exchanged once, so do the next step right away

**3. Exchange the Auth Code for a Refresh Token**

Run this request, replacing the values (the redirect URI must match the one used above exactly):

```bash theme={"dark"}
curl -X POST "https://accounts.snapchat.com/login/oauth2/access_token" \
  -d "client_id=YOUR_CLIENT_ID" \
  -d "client_secret=YOUR_CLIENT_SECRET" \
  -d "code=THE_AUTH_CODE" \
  -d "grant_type=authorization_code" \
  -d "redirect_uri=https://www.youragency.com/snapchat-callback"
```

The response contains `refresh_token`. Copy it.

> **Important:** Keep this token secure. Anyone holding it, together with your client ID and secret, can act on every ad account the user can reach.

**4. Connect to Markifact**

1. In Markifact, go to the [Connections](https://app.markifact.com/connections) page
2. Click **Connect** on **Snapchat Ads**
3. Select the **Custom App (White-label)** tab
4. Enter a **Connection Name** (for example "Acme Agency Snapchat Ads")
5. Paste your **Client ID**, **Client Secret**, and **Refresh Token**
6. Click **Verify & Connect**

Markifact refreshes the token once with your app, then makes one call that lists the organizations the user belongs to. Nothing is saved unless both succeed.

***

## Selecting Your Connection

Custom app connections appear under the name you chose, with a **Custom app** badge on the Connections page. Select them in Snapchat Ads nodes, agents, and MCP exactly like any other Snapchat Ads connection.

***

## Rotating or Replacing the Token

Add the connection again with the **same connection name** and the new values. Markifact replaces the stored credentials in place, so workflows and agents bound to the connection keep working.

***

## Troubleshooting

> [accordion] Snapchat rejected the client ID or client secret (invalid\_client)
>
> Check both values under **Business Details** > **OAuth Apps**. The secret is shown only once at creation; if you lost it, create a new OAuth app.

> [accordion] Snapchat rejected the refresh token (invalid\_grant)
>
> The token was issued by a different app than the one whose client ID you pasted, or the user revoked the app. Authorize again with your app and paste the new refresh token.

> [accordion] This Snapchat user belongs to no organization
>
> The user who authorized is not a member of any Business Manager organization. Add them under **Members** in the Snap Business Dashboard, then authorize again.

> [accordion] A node fails with a permission error after connecting
>
> The token is missing a scope (profile nodes need `snapchat-profile-api`). Authorize again with both scopes and paste the new refresh token.

***

## Summary

| Item | Where to Find | What It Looks Like |
| - | - | - |
| **Client ID** | Snap Business Dashboard > Business Details > OAuth Apps | `00000000-0000-0000-0000-000000000000` |
| **Client Secret** | Same app, shown once at creation | `a1b2c3d4e5...` |
| **Refresh Token** | Response of the auth code exchange | `eyJraWQ...` |

***

## Related

> [card] [White-label Connections](https://docs.markifact.com/core-concepts/white-label-connections.md)
>
> Overview of custom app connections across channels

> [card] [Get Report](https://docs.markifact.com/nodes/snapchat_ads/snapchat_ads_get_report.md)
>
> Pull Snapchat Ads performance data


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.