How to authenticate your API requests
Send your API key with each news request
Written by Kent Hudson
June 28, 2026
Updated October 16, 2026
How to authenticate your API requests
Send your API key with every news request. Use Authorization: Bearer, X-API-Key or the api_key query parameter. You do not need a separate API login or password.
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://api.apitube.io/v1/news/everything?per_page=10"
Copy a key from API Keys in the dashboard. If you are new, follow your first news search.

How do you send your API key?
Choose one method:
- Bearer token:
curl -H "Authorization: Bearer YOUR_API_KEY" \ "https://api.apitube.io/v1/news/everything" - X-API-Key header:
curl -H "X-API-Key: YOUR_API_KEY" \ "https://api.apitube.io/v1/news/everything" - Query parameter:
curl "https://api.apitube.io/v1/news/everything?api_key=YOUR_API_KEY"
If several are present, the API uses Bearer first, then X-API-Key, then api_key. Prefer one per request. Headers work with both GET queries and POST requests with JSON filters.
Which method should you use?
Prefer a header in production. A URL containing api_key can be saved in history or logs. Use the query form when you need a quick manual test or a client that cannot set headers. Header names are case-insensitive.
What is the difference between live and test keys?
Live keys start with api_live_ and use account quota or pay-as-you-go balance. Full article text requires a paid plan.
Test keys start with api_test_. They return preview text without spending quota. Both modes authenticate in the same way. A Free live key also returns previews; see masked results.
What happens when authentication fails?
Read errors[0].code in the response:
401 ER0201: no key arrived. Check for a missing header or empty value.401 ER0202: the key is invalid or revoked. Copy an active key again.401 ER0230: the key expired. Update its expiry or use another key.403 ER0601,ER0602orER0603: the key is recognized, but an IP, domain or endpoint restriction blocked the request.
Rejected authentication does not use request quota. See authentication errors and the official authentication reference.
Common Questions
- Do all endpoints require an API key?
- Where do I find or create my API key?
- Can I send the key in a POST body?
- Is authentication different for streaming or webhooks?
Do all endpoints require an API key?
News and webhook-management routes require a key. /ping, /openapi.json and /robots.txt are public.
Where do I find or create my API key?
Open API Keys in the dashboard and copy an existing key or click Create key. Select Test or Live mode before creating it. See how to manage keys.
Can I send the key in a POST body?
No. Put search filters in the JSON body, and the key in a header or URL query parameter.
Is authentication different for streaming or webhooks?
Streams and webhook-management requests use API keys. Browser EventSource cannot set custom headers, so pass api_key in the stream URL and use a restricted key. Incoming webhook deliveries use a separate signing secret for verification.