Skip to main content

Authentication

All endpoints require authentication through RapidAPI using two standard headers.

How It Works

RapidAPI acts as a gateway between your application and this API. When you subscribe to the API on RapidAPI, you receive a personal API key. Every request you make must include this key so RapidAPI can verify your identity, enforce your subscription limits, and route the request to the backend.

Required Headers

HeaderValueRequired
x-rapidapi-keyYour RapidAPI API keyYes
x-rapidapi-hostfast-news-with-previews.p.rapidapi.comYes

Both headers are available on the API's RapidAPI page, under the "Endpoints" tab. When you use RapidAPI's built-in test console or SDK, these headers are included automatically.

Example

curl -X GET "https://fast-news-with-previews.p.rapidapi.com/health" \
-H "x-rapidapi-key: YOUR_RAPIDAPI_KEY" \
-H "x-rapidapi-host: fast-news-with-previews.p.rapidapi.com"

Auth Errors

HTTP StatusResponse BodyCauseFix
401 Unauthorized{"detail": "Missing authentication header"}The authentication header is not presentInclude the x-rapidapi-key and x-rapidapi-host headers in your request
403 Forbidden{"detail": "Invalid proxy secret"}The request did not originate from the RapidAPI gatewayEnsure you are calling the API through RapidAPI, not directly

Notes

  • Rate limiting is handled entirely by RapidAPI's gateway based on your subscription plan. The API itself does not enforce rate limits.
  • Your API key must be transmitted exactly as provided by RapidAPI — no extra spaces, line breaks, or encoding changes.
  • If you see a 403 error, make sure you are sending requests to https://fast-news-with-previews.p.rapidapi.com (through RapidAPI) rather than to any direct backend URL.