Reddit API — Authentication — FetchLayer Docs
Documentation menu
FetchLayer FetchLayer API

Authentication

All endpoints use Bearer token authentication. No OAuth, no Reddit credentials — just one API key.

API Keys

Generate API keys from your dashboard. Each key is an ss- prefixed secret token. You can create multiple keys and revoke them independently.

Keep your key secret

Never expose your API key in client-side code, mobile apps, or public repositories. Make requests from a server you control, and rotate a key immediately if it leaks.

Sending requests

Include your API key in the Authorization header as a Bearer token.

bash
curl -X POST https://api.fetchlayer.dev/reddit/search \
  -H 'Authorization: Bearer ss-your-key' \
  -H 'Content-Type: application/json' \
  -d '{"query": "developer tools", "limit": 5}'

Error responses

Invalid or missing API keys return a 401 Unauthorized response.

json
{
  "error": "Invalid API key"
}

Rate limits

Rate limits are based on your plan. Exceeding a per-minute or plan allowance returns a 429 Too Many Requests response with a JSON error message.