Twitter API — Authentication — FetchLayer Docs
FetchLayer fetchlayer.dev Sign in

Authentication

All endpoints use Bearer token authentication. No Twitter credentials — just one FetchLayer API key.

API Keys

Generate API keys from your dashboard. Each key is a ss- prefixed secret token. You can create multiple keys, scope them by platform, and revoke them independently.

Sending requests

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

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

Error responses

Invalid or missing API keys return a 401 Unauthorized response.

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