Authentication
API keys, environments, scopes, and how to keep keys safe.
Every request to the OmiCloud API is authenticated with an API key sent as a bearer token:
Authorization: Bearer omi_live_k7Qw…Keys and environments
Keys are created in the OmiCloud console under API keys and are shown once. OmiCloud stores only a hash; if you lose a key, revoke it and create another.
| Prefix | Works against | Money |
|---|---|---|
omi_test_ | https://sandbox-api.omicloud.io | Gateway sandboxes. No real funds. |
omi_live_ | https://api.omicloud.io | Real funds. |
A key sent to the wrong host is rejected with 401 UNAUTHORIZED, the same as an invalid key. Nothing about the key leaks which environment it belongs to.
Scopes
Each key carries scopes. Keys created in the console get all four unless you narrow them:
| Scope | Allows |
|---|---|
sessions:write | POST /v1/sessions, POST /v1/quotes, discovery |
payouts:write | POST /v1/payouts |
transactions:read | GET /v1/transactions*, GET /v1/sessions/* |
webhooks:manage | everything under /v1/webhook-endpoints |
A key without the needed scope receives 403 FORBIDDEN_SCOPE. A useful split is one key with sessions:write + transactions:read on your player-facing service, and a separate payouts:write key on the service that approves withdrawals.
Operator status
Your operator account can be paused by OmiCloud (for example while a compliance question is open). A paused operator's keys still authenticate — reads work — but writes return 403 OPERATOR_PAUSED with the reason in message.
Keeping keys safe
- Send keys only from server-side code. Never embed one in a mobile app or a browser.
- Rotate by creating a second key, deploying it, then revoking the first. Both are valid during the overlap.
- Revoking a key is immediate. Requests in flight with the old key fail with
401. - The console shows
lastUsedAtper key so you can find the ones that are dead.
What the key identifies
The key resolves to your operator. Every read is scoped to that operator automatically — there is no operatorId parameter anywhere in the API, and no way to see another operator's transactions. Transactions record which key created them (apiKeyId in the console) so you can trace activity per integration.
Updated about 2 months ago