docs
UAEN
Docs/Guides/Authentication

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_KEY

Creating an API Key

  1. Log in to the Rekognita Dashboard.
  2. Go to Settings → API Keys.
  3. Click Create New Key.
  4. Select the necessary permissions (scopes).
  5. 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.