How to obtain credentials for the Reddit Ads source
To connect to the Reddit Ads API and start importing data into Google Sheets or Google BigQuery, follow the steps below:
Step 1: Create a Reddit App
Section titled “Step 1: Create a Reddit App”Visit the Reddit Preferences page and log in with your Reddit account, or create a new one.
Click the Create App button.
Fill in the form:
- App Name and Description
- App type: Select
script
- Redirect URI:
http://localhost:8080
- Click Create App
After creating the app, you’ll see:
- Client ID (just under the app name)
- Client Secret
- Redirect URI
Step 2: Request Reddit API Access
Section titled “Step 2: Request Reddit API Access”Go to the Reddit API Access Request Form
In the form:
In the form, select:
- “I’m a Developer”
- “I want to register to use the free tier of the Reddit API”
- Purpose: Select
Other
Provide additional information:
-
Describe your tool’s purpose. Example:
“We plan to use the Reddit Ads API to automatically extract advertising metrics and store them in Google Sheets and BigQuery. This data will be processed via OWOX Data Marts to support daily marketing reporting and optimization efforts.”
-
Add a link to the repository:
https://github.com/OWOX/owox-data-marts
-
Include your Reddit username
Fill in the contact information and use case details:
-
Reddit API Use Case: Example:
“The Reddit Ads API will be used to automate data collection from our ad account. We use OWOX Data Marts to transfer this data into Google Sheets and BigQuery for marketing analytics, allowing us to streamline reporting and improve media planning.”
-
Developer Platform:
Google Sheets, App Script
-
OAUTH Client ID(s): Paste the Client ID from your app
Finalize the request:
-
Subject of inquiry: Request access to Reddit API
-
Details of inquiry: Example:
“Our organization intends to leverage the Reddit Ads API to access campaign-level advertising data for integration into our internal analytics workflows. Using the OWOX Data Marts platform, this data will be securely transferred to Google Sheets and Google BigQuery to support real-time performance tracking, marketing spend analysis, and strategic reporting.”
-
Leave the attachment field empty
-
Click Submit
Step 3: Generate the Authorization Code
Section titled “Step 3: Generate the Authorization Code”To obtain the authorization code, use the following URL (replace YOUR_CLIENT_ID
and RANDOM_STRING
accordingly, for example, abc123):
https://www.reddit.com/api/v1/authorize ?client_id=YOUR_CLIENT_ID &response_type=code &state=RANDOM_STRING &redirect_uri=http://localhost:8080 &duration=permanent &scope=read
Open the URL in your browser, press Enter, and when prompted, click Allow (make sure you’re logged in to the Reddit account that owns the ad account).
- You will be redirected to a URL like:
http://localhost:8080/?state=xyz123&code=bLcIq0FR9-8hjOpklbxK2dtRTsA#_
Copy the value of the code
parameter — in this example, bLcIq0FR9-8hjOpklbxK2dtRTsA
.
Step 4: Exchange Authorization Code for a Refresh Token
Section titled “Step 4: Exchange Authorization Code for a Refresh Token”Use Postman to exchange the authorization code for a refresh token.
Parameters:
grant_type=authorization_code
code=YOUR_CODE
(from previous step)redirect_uri=http://localhost:8080
Auth Type: Basic Auth
- Username: Your Client ID
- Password: Your Client Secret
Step 5: Set the User-Agent Header
Section titled “Step 5: Set the User-Agent Header”Reddit requires a properly formatted User-Agent
header for all API requests. Use the following format:
googleapps:owox-data-marts.redditads:v1.0.0 (by /u/client_reddit_username)
Replace
client_reddit_username
with your actual Reddit username.
For more info on best practices for User-Agent, refer to the Reddit’s API Guidelines.
✅ You’re Ready
Section titled “✅ You’re Ready”You now have:
- Client ID
- Client Secret
- Redirect URI
- Refresh Token
- User-Agent
You can now use these credentials as described in the Getting Started guide.