Authentication
Two ways in: a browser session for the Oydin app, and personal API tokens for your code.
Personal tokens
Tokens look like oyd_… and belong to one business. Send them as a bearer header on every /api/v1/* request:
Authorization: Bearer oyd_XXXXXXXX
Only a SHA-256 hash and an 8-character prefix are stored, so a lost token cannot be recovered. Create a new one and revoke the old one.
Scopes
| Scope | Allows |
|---|---|
read | All GET /api/v1/* endpoints. |
write | POST /api/v1/transactions/. Add it alongside read. |
Rate limit
60 requests per minute per token. Beyond that you get 429 {"error":"rate_limited"} and a Retry-After header in seconds.
Errors
| Status | error | Meaning |
|---|---|---|
| 401 | invalid_token | Missing, malformed or revoked token. |
| 403 | forbidden | Token lacks the needed scope. |
| 429 | rate_limited | Wait Retry-After seconds. |
Auth for your own services
REST handlers and MCP servers you connect to Oydin use one custom header (for example Authorization: Bearer … or X-Api-Key: …). Its value is encrypted at rest and is never returned by the API.