Authentication
Rekognita API uses Bearer tokens to authorize requests. Every request to the API must include an Authorization header with your API key.
Header Format
Authorization: Bearer YOUR_API_KEYCreating an API Key
- Log in to the Rekognita Dashboard.
- Go to Settings → API Keys.
- Click Create New Key.
- Select the necessary permissions (scopes).
- Copy the key — it will only be shown once.
Security. Store API keys in environment variables. Never store them in code or public repositories.
Scopes
When creating a key, you can choose one or more permissions:
documents:read— read documents and results.documents:write— upload and delete documents.webhooks:manage— manage webhooks.account:read— account and usage information.
Examples
curl
curl https://api.rekognita.com/v1/documents \
-H "Authorization: Bearer rk_sk_abc123def456"Python
import os
from rekognita import Client
client = Client(api_key=os.environ["REKOGNITA_API_KEY"])Node.js
import { Rekognita } from '@rekognita/sdk';
const client = new Rekognita({
apiKey: process.env.REKOGNITA_API_KEY,
});Error Handling
If the key is invalid or missing, the API will return a 401 Unauthorized response code:
{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}If your key has been compromised, deactivate it immediately in the dashboard and create a new one.