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

# Snapchat source for ELT & CDC

> Configure Snapchat as a data source in Integrate.io ELT & CDC. Replicate ad accounts, campaigns, ads, creatives, and catalog data to your warehouse.

|                           |                                                                                                                                                                                                                       |
| :------------------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Description**           | Snapchat is a visual messaging platform whose Marketing API exposes the advertising objects behind Snap campaigns: organizations, ad accounts, campaigns, ad squads, ads, creatives, catalogs, and audience segments. |
| **Supported Replication** | Full Sync                                                                                                                                                                                                             |
| **Authentication Type**   | OAuth 2.0 (your own Snap OAuth app)                                                                                                                                                                                   |

## Collections

| **Collection Name**     | **Full/Initial Sync** | **Incremental/Continuous Sync** | **Supports Update** | **Supports Delete** | **Notes**                                           |
| :---------------------- | :-------------------- | :------------------------------ | :------------------ | :------------------ | :-------------------------------------------------- |
| organizations           | ✔                     | ✖                               | ✔                   | ✖                   | Top of the hierarchy, read from the authorized user |
| adaccounts              | ✔                     | ✖                               | ✔                   | ✖                   | Read per organization                               |
| campaigns               | ✔                     | ✖                               | ✔                   | ✖                   | Read per ad account                                 |
| adsquads                | ✔                     | ✖                               | ✔                   | ✖                   | Read per ad account                                 |
| ads                     | ✔                     | ✖                               | ✔                   | ✖                   | Read per ad account                                 |
| creatives               | ✔                     | ✖                               | ✔                   | ✖                   | Read per ad account                                 |
| media                   | ✔                     | ✖                               | ✔                   | ✖                   | Read per ad account                                 |
| audience\_segments      | ✔                     | ✖                               | ✔                   | ✖                   | Read per ad account                                 |
| pixels                  | ✔                     | ✖                               | ✔                   | ✖                   | Read per ad account                                 |
| lead\_generation\_forms | ✔                     | ✖                               | ✔                   | ✖                   | Read per ad account                                 |
| fundingsources          | ✔                     | ✖                               | ✔                   | ✖                   | Read per organization                               |
| catalogs                | ✔                     | ✖                               | ✔                   | ✖                   | Read per organization                               |
| product\_feeds          | ✔                     | ✖                               | ✔                   | ✖                   | Read per catalog                                    |
| product\_sets           | ✔                     | ✖                               | ✔                   | ✖                   | Read per catalog                                    |

Every collection keys on `id` and syncs in full on each run, so changes made in Snapchat overwrite the matching row in your destination. Objects deleted in Snapchat are not removed from the destination.

## Setting up Snapchat for ELT & CDC

### Overview

ELT & CDC uses the Marketing API provided by Snapchat to sync the data.

<Card title="Snapchat Marketing API Reference" icon="code" href="https://developers.snap.com/marketing-api/Ads-API/introduction" horizontal />

### Requirements

* An OAuth app created in [Snap Business Manager](https://business.snapchat.com), under **Business Details → OAuth Apps**. The Organization Admin role is required to open that dashboard.
* The Client ID and Client Secret belonging to that app.

Snapchat does not offer a shared connector app, so each Integrate.io source authorizes through an OAuth app that you create and own.

### Setup Steps

<Steps>
  <Step title="Create an OAuth app in Snap Business Manager">
    In [Snap Business Manager](https://business.snapchat.com), open **Business Details → OAuth Apps** and create an OAuth app. You must be an Organization Admin to see this section.
  </Step>

  <Step title="Set the redirect URI">
    Set the app's redirect URI to:

    ```
    https://console.flydata.app
    ```
  </Step>

  <Step title="Copy the client ID and client secret">
    Copy the `client_id` and `client_secret` the app shows you. Snapchat reveals the secret only once, at the moment the app is created. If you lose it, you have to generate a new one.
  </Step>

  <Step title="Enter the credentials in Integrate.io">
    In Integrate.io, go to the ELT & CDC Sources page, select Snapchat, and enter the **Client id** and **Client Secret**. The Client Secret is required: it is used to exchange the authorization code and to refresh the access token on every sync.
  </Step>

  <Step title="Authorize">
    Continue to authorize. A Snapchat window opens and asks you to grant access. Approving it returns a refresh token that Integrate.io stores with the source.
  </Step>

  <Step title="Choose collections and a destination">
    Select the collections you want to replicate, pick a destination warehouse, and start the initial sync.
  </Step>
</Steps>

### Requested scopes

Authorization requests the following Snapchat scopes:

* `snapchat-marketing-api`
* `snapchat-offline-conversions-api`
* `snapchat-profile-api`

## Limitations

* **No incremental sync**: Snapchat collections are read in full on every run. There is no replication key, so sync time scales with the size of your ad accounts rather than with the number of recent changes.
* **Deletes are not propagated**: objects removed in Snapchat stay in the destination. Filter on the status fields in your warehouse if you need to exclude them.
* **Rate limits**: requests are capped at 5 concurrent calls with at least one second between calls, which lengthens the initial sync for organizations with many ad accounts.
* **Access follows the authorizing user**: the connector only sees the organizations and ad accounts that the account you authorized with can access. Missing collections are usually a permissions gap in Snap Business Manager rather than a pipeline error.

## FAQ

**Q: Can I use an Integrate.io-provided Snapchat app instead of creating my own?**

No. Snapchat requires each integration to authorize through an OAuth app registered in your own Snap Business Manager organization, so you supply the Client ID and Client Secret.

**Q: I lost the client secret. What now?**

Snapchat shows the secret only once. Generate a new OAuth app (or a new secret, where Snap Business Manager offers it), then update the source in Integrate.io with the new values and reauthorize.

**Q: Authorization fails with a redirect URI error. What should I check?**

The redirect URI registered in your Snap OAuth app has to be `https://console.flydata.app`.

**Q: Why do I need Organization Admin in Snap Business Manager?**

The **Business Details → OAuth Apps** section is only visible to Organization Admins. Without that role you cannot create the app or read its credentials.

## Related

<CardGroup cols={2}>
  <Card title="What is ELT & CDC" icon="arrow-right" href="/docs/cdc/what-is-integrateio-cdc" horizontal />

  <Card title="Hooks" icon="arrow-right" href="/docs/cdc/hooks" horizontal />

  <Card title="Initial Sync Process" icon="arrow-right" href="/docs/cdc/initial-sync-process" horizontal />

  <Card title="Data Type Mapping" icon="arrow-right" href="/docs/cdc/data-type-mapping-redshift-snowflake-and-bigquery" horizontal />
</CardGroup>
