Reddit developer documentation
Reddit integration API
The authenticated interface between the moderator-installed AmezPrice app and the existing AmezPrice product and delivery service.
These documents are public; the API is authenticated. HTTP Fetch access to amezprice.com is currently rejected. An exception is being requested. External Endpoints, commercial use and app distribution remain subject to Reddit review.
Scope and existing service
Requested hostname: amezprice.com. Base URL: https://amezprice.com/api/social-media/reddit. The Devvit app makes the two server-side HTTPS POST requests below. It does not fetch Amazon pages, arbitrary product URLs or other domains.
AmezPrice already maintains product classification, recorded sale-price observations and a shared social-delivery ledger outside Reddit. Devvit hosts the community app and stores its local preferences and short-term receipts. The integration lets the existing website learn which communities installed the app and what their moderators selected, while the catalogue supplies the current subcategory names from the same product database.
This is a request to connect that existing service, not a claim that Devvit lacks hosting, storage or scheduling. If the requested use is outside Reddit policy, the operator will seek a supported design rather than relay rejected traffic through an allowed service.
Current app marketplaces: India (IN), United Kingdom (UK) and United States (US). Protocol examples use illustrative community identifiers and paused Deals.
Authentication and limits
Both endpoints require the same operator-managed server-side signing secret. Use the configured secret string as UTF-8; do not hex-decode it. Moderators do not provide website credentials or receive this secret. It is stored in the Devvit global secret setting and encrypted website settings.
X-Amez-Timestamp: ten-digit Unix timestamp in seconds, within five minutes of server time.X-Amez-Signature: lowercase hex HMAC-SHA256 oftimestamp + "." + exact_request_body.- Use JSON, HTTPS and the exact signed bytes. Maximum accepted request body: 16 KiB.
- The website applies a 600-request-per-minute route throttle; invalid authentication returns 401. Installation nonces are checked for replay for ten minutes.
- No signature, signing key, Reddit managed token or API credential is included in these public examples.
import { createHmac } from 'node:crypto';
// Read the operator-managed secret from secure server configuration.
const secret = process.env.AMEZ_REDDIT_REGISTRY_SECRET;
if (!secret) throw new Error('Server-side signing key is not configured');
const body = JSON.stringify({ app: 'amezprice', country: 'IN' });
const timestamp = String(Math.floor(Date.now() / 1000));
const signature = createHmac('sha256', secret)
.update(timestamp + '.' + body).digest('hex');
const headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Amez-Timestamp': timestamp,
'X-Amez-Signature': signature,
};
// Send these exact body bytes with these headers from an authorized server.
// This example computes headers only; it does not make a request.POST /catalogue
Called when a moderator opens AmezPrice: Deal rules. It reads the current category/subcategory names for the selected marketplace. It does not register a community, enable posting or mutate destination preferences.
Request body
{
"app": "amezprice",
"country": "IN"
}Example response · 200
{
"catalogue": {
"Electronics": [
"Headphones",
"Smartphones"
],
"Books": [
"Fiction",
"History"
]
}
}The response uses Cache-Control: private, no-store. The app also maintains a labelled saved/bundled fallback when live access fails. Saving uses the catalogue snapshot from opening the form; it does not make an inline catalogue request.
POST /installations
Called on installation/upgrade, by a queued job after a successful settings Save, and by the five-minute heartbeat. It registers the installation community name/ID, chosen marketplace, subcategories and up to two discount/flair rules.
{
"app": "amezprice",
"subreddit": "ExampleDeals",
"subreddit_id": "t5_demo123",
"nonce": "00000000-0000-4000-8000-000000000001",
"enabled": false,
"country": "IN",
"discount_mode": "all",
"minimum_discount": null,
"maximum_discount": null,
"categories": {
"*": [
"Smartphones",
"Fiction"
]
},
"discount_rules": [
{
"enabled": false,
"discount_mode": "both",
"minimum_discount": 5,
"maximum_discount": 15,
"flair": "deal_radar",
"flair_text": "Deal Radar"
},
{
"enabled": false,
"discount_mode": "min",
"minimum_discount": 15.01,
"maximum_discount": null,
"flair": "amezdeals",
"flair_text": "AmezDeals"
}
]
}categories: {} means all subcategories. A wildcard parent such as {"*":["Smartphones","Fiction"]} selects those subcategory names independently of their parent category. Legacy parent-specific category mappings remain supported.
Discount modes: min, max, both and all. Active limits are 5–100%, with up to two decimals; unused limits are null. A flair is deal_radar, amezdeals or an existing community flair template UUID. The native UI has exactly Deal 1 and Deal 2; both start Off.
The endpoint updates only the identified installation's registry/preferences and heartbeat. Verification uses Reddit's managed External Endpoints gateway. Registration can succeed with verified: false while that separate permission or token is unavailable. Registration itself never publishes a deal.
Example response · 200
{
"status": "ok",
"verified": false,
"catalogue": {
"Electronics": [
"Smartphones"
],
"Books": [
"Fiction"
]
}
}A repeated nonce returns {"status":"ok","replayed":true} without refreshing the heartbeat or re-enabling the destination. Validation failures use 422; malformed or stale signatures use 401; throttled requests use 429.
Separate incoming publishing flow
- The website checks eligible products against the community's enabled Deals and subcategories.
- It sends a product title, caption, discount, campaign UUID and inline 1080 × 1350 JPEG to Reddit's managed gateway for the installed app's
/external/amezpriceendpoint. This is website-to-Reddit traffic, not an additional outbound fetch domain. - The app verifies the target against its installation context, rechecks enabled discount rules and campaign receipts, uploads the image to Reddit and creates a native post as the app account.
- The website retains the resulting delivery receipt. A lost/uncertain result is reconciled or held for review instead of blindly resent.
New installations require moderator opt-in. A destination receives at most one selected product per 15-minute slot. Products need a price check within twelve hours and at least a 5% recorded-sale-price discount. The comparison uses the highest recorded actual sale price and current observed price, rather than MRP; recorded history can be incomplete and is not a lowest-ever guarantee.
Overlapping Deals produce one post using the first enabled matching flair. The same destination/product price is not sent again just because filters change or the app is reinstalled. Both Deals Off disables app-side publishing. Uninstalling removes Reddit gateway access; missing heartbeats stop website dispatch after twenty minutes.
Data, privacy and commercial use
Outgoing payloads contain app/community identifiers, marketplace, moderator preferences and replay-protection metadata. They do not contain moderator usernames/user IDs, member lists, comments, votes, private messages, passwords, payment data or browsing histories. The app reads a moderator identity inside Reddit to authorize settings edits and holds a short-lived editor session in Devvit Redis.
The website stores installation metadata, selected rules/subcategories, product quotes and delivery receipts. Devvit receipts last thirty days. Website delivery records do not have automatic time-based expiry because they protect against repeated same-price posts; diagnostic social log files rotate with ninety-day retention. See the app privacy notice for retention, the owner-community wiki backup and support/deletion requests.
Commercial disclosure: AmezPrice is a commercial price-information website. Product links may lead to Amazon affiliate purchases and may earn AmezPrice a commission at no additional cost to the buyer. No payment or AmezPrice account is required to configure this Reddit app. Commercial/affiliate use is disclosed for Reddit review; HTTP Fetch approval would not by itself approve that use.
The app does not automate voting, comments, direct messages or engagement rewards.
Review links: Developer Platform app · OpenAPI specification · App privacy · App terms