Reddit Ads (Audience) Integration Recipe
This recipe will guide you through setting up a custom destination for Reddit Ads (Audiences) using Twilio Segment’s Extensible Webhooks feature. By following these steps, you will be able to integrate your data source with Reddit Ads (Audiences).
Prerequisites
To integrate Reddit Ads with Segment, ensure you have the following:
- A Segment account: an account with the Extensible Webhooks feature enabled (private beta access).
- A Reddit Ads (Audiences) account: an active account or API access to Reddit Ads (Audiences).
- Authentication credentials: necessary credentials for authentication, for example, API keys and tokens.
- Data mapping information: knowledge of the data fields required by Reddit Ads (Audiences).
Getting started
1. Configure Extensible Webhooks as a destination
- In your Segment workspace, navigate to Connections > Catalog > Destinations.
- Use the search bar to search for “Extensible Webhooks” and select Add destination.
2. Select the data source
- Choose the source that you want to send data from to Reddit Ads (Audiences).
- Click Next to proceed.
- Give your destination a name and create your destination.
3. Specify the instance details
In Reddit Ads, create an app. For steps on how to do this, see the Reddit documentation.
When creating your app, specify the following details:
- Name: Give your webhook instance a recognizable name.
- Description (optional): Add a brief description of the integration.
- Endpoint URL: Provide the webhook URL or endpoint provided by Reddit Ads (Audiences).
Redirect URI
The redirect URI used when creating a Reddit web app is https://app.segment.com/oauth-service/webhook/callback
.
4. Select the authentication type
Reddit provides developers with an option to create a web application to set up OAuth 2.0 for the Ads API to be authenticated. Once a web app has been created, you will need to note down the Client ID and Secret provided by Reddit. These will be used to set up authentication on Segment.
To set up OAuth:
- Go to Authentication Method and select OAuth 2.0.
- Enter the following credentials as required:
- Client ID: This can be found in your the Reddit web app.
- Secret: This can be found in your the Reddit web app.
- Authorize URL:
https://www.reddit.com/api/v1/authorize
- Token URL:
https://www.reddit.com/api/v1/access_token
- Refresh URL:
https://www.reddit.com/api/v1/access_token
- Scope: To update Audiences, you will need to add ‘adsedit’ as a scope. To add multiple scopes, separate the values by commas.
You can also find the Authorize URL, Token URL, and Refresh URL in the Reddit documentation.
- Once you create the destination instance, you will be redirected to Settings. Click on Connect to set up the OAuth connection with Reddit and you’ll be redirected to reddit. Click on “Allow” to complete the authentication flow.
- Once you’re redirected back to the destination settings page, this means that authentication is completed and you’re now ready to send events to Reddit.
5. Perform data mapping
Data transformation
The Reddit Custom Audience API expects data in a nested format. To format the payload correctly, you will have to write an insert function that appends a new property, such as “body”.
This will have the following structure:
{
"data": {
"action_type": "ADD",
"column_order": [
"EMAIL_SHA256",
"MAID_SHA256"
],
"user_data": [
[
"d7ef2e7b2a3663c25284a3d6d13b1ca727fc8c659474b81afe0cec997a4737d2",
"510870d7b3e47a28a2b2f3aef27a4c81aab0b2eefda27dea50bc4c991d9e5435"
]
]
}
}
The required parameters are:
action_type
which can take valuesADD
orREMOVE
depending on whether a customer has to be added or removed from the list.column_order
which can take two values,EMAIL_SHA256
andMAID_SHA256
. The order indicates the column order of the data being synced insideuser_data
.user_data
is an array of values which has hashedemail_id
orMAID_id
or both. While in beta, Segment doesn’t support batching to iterate just over this array yet.
Data mapping
In this recipe, as an example, users are added to the existing audience but you can use one or multiple mappings to perform any PUT
, PATCH
or POST
action types.
- Create a new mapping from the Mappings tab, click on Add Mapping and select the Send HTTP action.
- Select events to send. Define the event triggers to send to Reddit Ads (Audiences) using the event filters.
- Fill out mapping fields:
- Specify the URL and method.
- For example, using the following URL:
https://ads-api.reddit.com/api/v3/custom_audiences/{audience_id}/users
- For example, using the following URL:
- Replace
audience_id
with the actual audience ID you want to edit. You can find the ID below the name of the Audience List to be modified on Audience Manager. - Select
PATCH
as the HTTP method. The API expects aPATCH
operation on the endpoint.
- Specify the URL and method.
- Use the mapping interface and search for the “body” parameter that was created in the insert function to select the transformed object that can be sent as the event body.
- Turn off batching for this operation.
Reddit supports three types of actions that can be performed via Extensible Webhooks.
- Audiences
- Manage Audiences: Create a new audience or manage existing ones.
- Manage Audience Users:
PATCH
users in existing audiences or create a new audience and add users to it.
- Campaigns
- Manage Campaigns: Create a new campaign or manage existing ones.
6. Test the output and connection
- Click Test Connection to send a sample payload.
- Verify in Reddit Ads (Audiences) that the test data has been received and processed correctly.
Troubleshooting:
If the test fails:
- Review the authentication details and data mappings.
- Check for error messages in Segment and Reddit Ads (Audiences).
7. Save and enable the destination
- Once the test is successful, click Save to store your configuration.
- Toggle the destination to Enabled to start sending live data.
- Monitor the data flow to ensure events are being delivered as expected.
This page was last modified: 26 Jun 2025
Need support?
Questions? Problems? Need more info? Contact Segment Support for assistance!