> ## 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 Reddit Ads App

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

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

<Note>
  Custom app connections are available on the **Team** plan. See [White-label Connections](/core-concepts/white-label-connections) for the overview.
</Note>

***

## Quick Connect vs Custom App

| Feature                 | Quick Connect        | Custom App                                           |
| :---------------------- | :------------------- | :--------------------------------------------------- |
| **Setup Time**          | 1 minute             | 15-20 minutes, plus Reddit's Ads API access approval |
| **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 Reddit app:

| Value             | Where it comes from                                                                                                             |
| :---------------- | :------------------------------------------------------------------------------------------------------------------------------ |
| **App ID**        | The client ID shown under your app at [reddit.com/prefs/apps](https://www.reddit.com/prefs/apps)                                |
| **App Secret**    | The same app                                                                                                                    |
| **Refresh Token** | Minted against that app with `duration=permanent`, by the Reddit user who is a member of the business that owns the ad accounts |

Reddit access tokens last one hour; Markifact refreshes them with your app ID and secret on every run. Permanent refresh tokens stay valid until the user revokes the app.

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

### Scopes

Request all of these when the user authorizes: `adsread`, `adsedit`, `adsconversions`, `adsdatadeletion`, `history`, `read`, `identity`. Missing scopes surface later as Reddit permission errors on the node.

***

## Setting Up Your Custom Reddit Ads App

<Steps>
  <Step title="Create the App">
    1. Sign in to Reddit with the account that will own the app and open [reddit.com/prefs/apps](https://www.reddit.com/prefs/apps)
    2. Click **create another app**, choose **web app**, and enter the name and description. This is the branding users see when they authorize
    3. Under **redirect uri**, enter a URL you control (for example `https://www.youragency.com/reddit-callback`). Reddit appends the auth code to this URL after authorization; the page does not need to do anything
    4. Click **create app** and copy the **client ID** (the string under the app name) and the **secret**
  </Step>

  <Step title="Request Reddit Ads API Access">
    The Ads API is not open to every app. Apply for Reddit Ads API access for your app and wait for Reddit's approval. Agencies that already run their own integrations will have this in place; until it is approved, the ads scopes return authorization errors.
  </Step>

  <Step title="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://www.reddit.com/api/v1/authorize?client_id=YOUR_APP_ID&response_type=code&state=markifact&redirect_uri=https%3A%2F%2Fwww.youragency.com%2Freddit-callback&duration=permanent&scope=adsread%20adsedit%20adsconversions%20adsdatadeletion%20history%20read%20identity
    ```

    2. Sign in as the Reddit user who belongs to the business that owns the ad accounts and click **Allow**
    3. Reddit 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
  </Step>

  <Step title="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://www.reddit.com/api/v1/access_token" \
      -u "YOUR_APP_ID:YOUR_APP_SECRET" \
      -A "youragency/1.0" \
      -d "grant_type=authorization_code" \
      -d "code=THE_AUTH_CODE" \
      -d "redirect_uri=https://www.youragency.com/reddit-callback"
    ```

    The response contains `refresh_token`. Copy it. (Reddit rejects requests without a `User-Agent`, which is what `-A` sets.)

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

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

    Markifact refreshes the token once with your app, then makes one call that lists the businesses the user belongs to. Nothing is saved unless both succeed.
  </Step>
</Steps>

***

## Selecting Your Connection

Custom app connections appear under the name you chose, with a **Custom app** badge on the Connections page. Select them in Reddit Ads nodes, agents, and MCP exactly like any other Reddit 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 title="Reddit rejected the app ID or app secret (401 Unauthorized)">
  Check both values under your app at reddit.com/prefs/apps. The app ID is the short string under the app name, not the app name itself.
</Accordion>

<Accordion title="Reddit rejected the refresh token (invalid_grant)">
  The token was issued by a different app, was minted without `duration=permanent` (so it expired after an hour), or the user revoked the app under Reddit **User Settings** > **Privacy** > **Authorized applications**. Authorize again and paste the new refresh token.
</Accordion>

<Accordion title="Reddit Ads API refused access (FORBIDDEN)">
  Either the token is missing the ads scopes, or your app has not been granted Reddit Ads API access yet. Check both, then authorize again.
</Accordion>

<Accordion title="This Reddit user belongs to no business">
  The user who authorized is not a member of any Reddit Ads business. Add them under **Business settings** > **Members** in Reddit Ads, then authorize again.
</Accordion>

***

## Summary

| Item              | Where to Find                             | What It Looks Like    |
| ----------------- | ----------------------------------------- | --------------------- |
| **App ID**        | reddit.com/prefs/apps, under the app name | `Ab1cD2eF3gH4iJ`      |
| **App Secret**    | Same app, "secret"                        | `k5L6mN7oP8...`       |
| **Refresh Token** | Response of the auth code exchange        | `123456789-AbCdEf...` |

***

## Related

<CardGroup cols={2}>
  <Card title="White-label Connections" icon="tag" href="/core-concepts/white-label-connections">
    Overview of custom app connections across channels
  </Card>

  <Card title="Get Report" icon="chart-line" href="/nodes/reddit_ads/reddit_ads_get_report">
    Pull Reddit Ads performance data
  </Card>
</CardGroup>
