Authorization header of each request.
Generating an API Key
To create an API key, open the Hitorino dashboard and navigate to Settings → API Keys. Click New API Key, give it a descriptive name (for example,production-backend or analytics-service), select the appropriate scope, and click Create. The key is displayed exactly once — copy it immediately and store it in a secure secrets manager or environment variable. Hitorino does not store or display the full key after creation.
You can create multiple API keys — one per integration or environment — and revoke them individually from the same Settings → API Keys page. Revoking a key immediately invalidates it; all subsequent requests using that key receive a 401 response.
Sending the API Key
Include your API key in theAuthorization header using the Bearer scheme on every authenticated request:
Replace
YOUR_API_KEY with the actual key value you copied from the dashboard. Do not include the literal string Bearer twice or wrap the key in quotes within the header value.Code Examples
Token Scopes
When you create an API key, you assign it one of two scopes. Choosing the narrowest scope your integration needs reduces the blast radius if the key is ever compromised.| Scope | Access |
|---|---|
read | GET requests only. Can list and retrieve streams, videos, users, and webhooks, but cannot create, update, or delete resources. |
write | Full access to all endpoints, including POST and DELETE operations such as scheduling streams, registering webhooks, and deleting webhooks. |
read-scoped key attempts a write operation, the API returns a 403 Forbidden error with the code insufficient_scope.
Authentication Error Codes
The following error responses relate specifically to authentication and authorization failures:401 Unauthorized
The API returns401 when no API key is provided or the key is invalid (for example, it has been revoked or was typed incorrectly).
- The
Authorizationheader is absent from the request. - The key value is incorrect or contains extra whitespace.
- The key was revoked from the Hitorino dashboard.
403 Forbidden
The API returns403 when the API key is valid but lacks the scope required by the endpoint being called.
- A
read-scoped key is used to call aPOSTorDELETEendpoint. - The key is valid but belongs to an account that does not have access to the requested resource.
Security Best Practices
- Never hard-code API keys in source code, front-end JavaScript bundles, or mobile app binaries. Use environment variables or a secrets manager (e.g., AWS Secrets Manager, HashiCorp Vault, Doppler).
- Rotate keys periodically. Create a new key, update your integration, verify it works, then revoke the old key.
- Use one key per environment. Keep separate keys for development, staging, and production so you can revoke a compromised environment’s key without affecting others.
- Log key usage. The Hitorino dashboard shows last-used timestamps for each key, making it easy to spot unexpected activity.