Orova Pocket

Docs

Authentication

Your programs use an API key. AI assistants and third-party apps use OAuth 2.1 so users grant access themselves.

API keys

Each key has 2 parts: the key ID ock_… and the secret ocs_…. The secret is shown only once at creation; store it safely and never ship it to a browser.

2 headers
curl https://chat.orova.vn/api/chat/v1/me \
  -H "X-Api-Key: ock_…" \
  -H "X-Api-Secret: ocs_…"
Bearer
curl https://chat.orova.vn/api/chat/v1/me \
  -H "Authorization: Bearer ock_…:ocs_…"

OAuth 2.1 for assistants and apps

AI assistants (Claude, ChatGPT…) and third-party apps register dynamically, send the user to a consent page, then receive an access token ocha_…. PKCE is required S256.

StepEndpoint
Authorization server metadatahttps://chat.orova.vn/.well-known/oauth-authorization-server
Protected resource metadatahttps://chat.orova.vn/.well-known/oauth-protected-resource/mcp
Dynamic client registrationhttps://chat.orova.vn/oauth/register
User consent (authorize)https://chat.orova.vn/oauth/authorize
Exchange code, refresh tokenhttps://chat.orova.vn/oauth/token
Revoke a tokenhttps://chat.orova.vn/oauth/revoke
  • Access tokens last 3600 seconds; refresh tokens last 30 days and rotate on every use.
  • Send the access token in the header Authorization: Bearer ocha_….
  • Users grant only the scopes the app requests and can revoke at any time.

Scopes

API keys and OAuth tokens can only do what their scopes allow. Pick as few as you can. Scopes marked Dangerous can delete or change important data.

ScopeAllows
profile
profile:read View your profile (name, photo, Chat ID)
profile:write Edit your profile
settings
settings:read View your Chat settings
settings:write Change your Chat settings
contacts
contacts:read View your contacts
contacts:write Add, edit and remove contacts
conversations
conversations:read View your conversation list
conversations:write Create and manage conversations and groups
messages
messages:read Read your messages
messages:write Send, edit and unsend messages
files
files:read View and download files and photos
files:write Upload and delete files and photos
calls
calls:read View your call history
calls:write Place and answer calls on your behalf Dangerous
ai
ai:read View your Orova AI history
ai:write Use Orova AI (charged to your wallet quota) Dangerous
wallet
wallet:read View your wallet balance and quota
devices
devices:read View your signed-in devices
devices:write Link new devices and sign devices out Dangerous
business
business:read View your business pages and customer care messages
business:write Manage business pages and message your customers Dangerous
events
events:read Receive new events (messages, calls) in real time
workspace_admin
workspace_admin:read View workspace admin data Dangerous
pockets
pockets:read View your Pockets and the ones you publish (catalog, versions, stats)
pockets:write Create, edit, upload versions, submit for review and publish Pockets
account
account:delete Request account deletion (needs an email OTP code) Dangerous

Scope presets

PresetIncludes
read_onlyprofile:read settings:read contacts:read conversations:read messages:read files:read calls:read ai:read wallet:read devices:read business:read events:read pockets:read
messagingprofile:read contacts:read conversations:read conversations:write messages:read messages:write files:read files:write events:read
fullprofile:read profile:write settings:read settings:write contacts:read contacts:write conversations:read conversations:write messages:read messages:write files:read files:write calls:read calls:write ai:read ai:write wallet:read devices:read devices:write business:read business:write events:read workspace_admin:read pockets:read pockets:write account:delete

Conventions

These apply to every REST and MCP operation.

Errors

Errors return JSON with error (machine code) and message. 422 errors also include details[].

JSON
{"error": "out_of_scope", "message": "…"}
HTTPCodeMeaning
400invalid_idempotency_keyIdempotency-Key is malformed (1–64 characters A–Z a–z 0–9 _ . : -).
401invalid_tokenThe key is missing, invalid, revoked or expired.
403insufficient_scopeThe key does not have the scope this operation needs.
403not_enabledThe Orova Chat API is not enabled for this account.
403ip_not_allowedThis key cannot be used from your IP address.
404not_foundThe resource does not exist or you cannot see it.
409idempotency_conflictThis Idempotency-Key was already used with a different request.
409idempotency_in_progressA request with this Idempotency-Key is still running; retry later.
422invalid_requestThe request is invalid; details[] lists each bad field.
429rate_limitedToo many requests; wait for Retry-After seconds, then retry.
500server_errorOrova server error; retry later.
502upstream_errorAn upstream service failed; retry later.

Pagination

List endpoints take limit (1–200, default 50) and cursor. Responses include next_cursor; when it is null you have reached the end.

JSON
{"data": [ … ], "next_cursor": "eyJpZCI6…"}

Idempotency-Key

Send the header Idempotency-Key on create/send operations to retry safely. The same key within 24 hours replays the original result with Idempotent-Replayed: true; the same key with a different body returns 409 idempotency_conflict.

curl
curl -X POST https://chat.orova.vn/api/chat/v1/… \
  -H "Authorization: Bearer ock_…:ocs_…" \
  -H "Idempotency-Key: 7f3c2a90-…" \
  -H "Content-Type: application/json" \
  -d '{…}'

Rate limits

600 requests per 60 seconds per key. Going over returns 429 with Retry-After (seconds to wait).

CORS and X-Request-ID

The API accepts requests from any origin (Access-Control-Allow-Origin: *), with no cookies; the key always travels in a header. Browsers can read the headers Retry-After, Idempotent-Replayed, WWW-Authenticate and X-Request-ID.

  • Every response carries X-Request-ID; include it when you contact support.
  • Never put the secret ocs_… in code that runs in your users' browsers — call from your server, or use OAuth.