Build a small web app that runs right inside Orova Chat on web, mobile and desktop, then publish it to every user.
What is a Pocket
A Pocket is a static web app (HTML, CSS, JS, images) that runs in the Pocket tab of Orova Chat on web, iOS, iPad, Android, macOS, Windows and Linux. It talks to Orova only through the SDK window.orova.
Orova serves your app from https://pocketapp.orova.vn/<slug>/ inside a sandboxed iframe whose origin is "null". That means:
Use relative paths for files in your zip (style.css, fetch("data.json")). Scripts, CSS and fonts load only from your Pocket itself (no CDN, no Google Fonts) — ship them in the zip.
Calling an external server (fetch, images, media, form posts) requires the host in domains; otherwise the browser blocks it. Child iframes are not allowed.
There are no cookies and page localStorage is unavailable — store data with orova.storage.
A Pocket is a single-page app: following a link or changing location.href makes Orova close it. Open outside pages with orova.openUrl().
Publishing flow
Create a Pocket in the console (ID, name) or call create_pocket.
Build a static web app, load the SDK, zip it with pocket.json at the root.
Upload the zip as a new version. Orova checks the structure and manifest on upload.
Open it in the sandbox: only you see it, inside the real Orova Chat, 15-minute link.
Fill in every app detail, then submit for Orova review (free, resubmitting is free too).
Approved → live in production for everyone. Upkeep is 20 USD per Pocket per year, paid from your balance.
Sandbox
A freshly uploaded, unreviewed version (it expires after 30 days without activity). Only the owner sees it in their own Pocket list. Sandbox links last 15 minutes; when one expires, reopen it from the console or call get_pocket_sandbox_url. Storage is shared with the production version.
Production
The reviewed version, shown to every user in the regions and on the platforms you declare. Needs an active 20 USD/year upkeep: when it lapses it is charged from your balance; not enough balance → 402 maintenance_required. Billing
Quick start
A minimal Pocket has 4 files. pocket.json must sit at the ROOT of the zip (not inside a folder).
hello-pocket.zip
├── pocket.json required, at the root
├── index.html start page (entry)
├── app.js
├── style.css
└── icon.png square, png/webp/jpg
Load the SDK with a script tag right in index.html (the full URL above, or the relative /_sdk/orova-pocket-sdk.v1.js). The handshake must start within 1.5 s after the page loads; scripts injected later cannot connect.
A JSON manifest (UTF-8, up to 256 KB) at the zip root. Orova checks every field on upload; a bad one returns 400 manifest_invalid with field and reason. Unknown fields only raise an unknown_field warning.
Field
Required
Type
Rule
name
Yes
string
1–30 characters (counted after NFC). The name shown in Orova Chat.
slug
Yes
string
3–48 characters of a-z, 0-9 and hyphen; must start and end with a letter or digit. Must equal the Pocket ID in the console (otherwise slug_mismatch). Reserved slugs (orova, official, admin, api, app, pocket, sdk, chat, mcp, help, support, test, demo…) and anything starting with orova- are rejected.
version
Yes
string
X.Y.Z (e.g. 1.0.0), up to 32 characters. Every upload needs a new version number (a repeat → version_exists).
entry
No
string
Start page (.html/.htm), default index.html. Must exist in the zip (otherwise entry_missing).
icon
Yes
string
Relative path to an image inside the zip: png, webp, jpg, jpeg. Missing → icon_missing. An icon uploaded in the console (square ≥ 128 px, ≤ 1 MB) takes priority.
category
Yes
string
An English category key, see the list below.
privacy_url
Yes
string
An https link to your privacy policy, up to 500 characters.
support_email
Yes
string
A valid support email, 3–200 characters.
age_rating
Yes
string
One of 4+, 9+, 12+, 17+.
short_description
No
string
One line, up to 30 characters. Required before you submit (set it here or in the console).
description
No
string
Long description, multi-line.
changelog
No
string | {locale: string}
What changed in this version, multi-line: a string, or {locale: string} (≤ 2000 characters per language; picked by the user’s language → en → vi).
permissions
No
array<string>
Permissions the app requests, each from the Permissions table. Missing → []. Unknown value → unknown_permission.
permission_reasons
No
object
A reason for each user.* data permission (except user.profile): 10–80 characters. Missing → missing_reason:<permission>.
domains
No
array<string>
Every external host your code talks to (fetch, images, media, forms). https host names only: no path, no IP, no port, no *.orova.vn.
locales
No
array<string>
Languages your UI supports (the 54 Orova Chat codes, e.g. vi, en, ja, zh-tw). Missing → ["vi", "en"].
regions
No
array<string>
["*"] or two-letter ISO 3166-1 country codes (e.g. ["VN", "TH"]). Missing → ["*"].
platforms
No
array<string>
["*"] or a subset of web, ios, ipad, android, macos, windows, linux. Missing → ["*"].
i18n
No
object
Name and descriptions per language: { "<code>": { name ≤ 30, short_description ≤ 30, description ≤ 4000 } }.
App details — required before you submit
Icon, name, Pocket ID, short description, category, support email, privacy policy (https), at least 1 language, at least 1 region and at least 1 platform are all REQUIRED. If any is missing, submitting returns 400 profile_incomplete with a missing list. The manifest only provides starting values: edit these fields in the console or through the API update_pocket.
Request only what you use. The 7 user.* data permissions (except user.profile) are sensitive: each REQUIRES a 10–80 character reason, shown to the user in the permission dialog, and a version requesting them is always checked by an Orova reviewer by hand (never auto-approved).
pocket.json
"permissions": ["user.profile", "user.phone", "conversation.send"],
"permission_reasons": {
"user.phone": "Fill in your phone number on the booking form"
}
i18n
Name and descriptions per language. Orova Chat shows the translation that matches the user’s language, then falls back to "en", then to the top-level name/short_description/description.
The top-level name/short_description/description are the base language (the first entry of locales). i18n in pocket.json only provides starting values: after that, edit the name and descriptions per language in the console (Pocket details page, pick a language) or with update_pocketi18n. Each call sends the FULL set: a language you leave out loses its translation, null clears them all. For an approved app the translations go to the draft and are reviewed like any other info.
changelog
What changed in this version: a string, or {locale: string} so each user reads it in their language (≤ 2000 characters per language). The API returns changelog in the caller’s language and the full set as changelog_i18n.
pocket.json
"changelog": {
"en": "Dark mode. Faster totals.",
"vi": "Giao diện tối. Tính tổng nhanh hơn."
}
locales ≠ regions ≠ platforms
These three fields answer three different questions. Do not mix them up:
Field
Means
Values
Effect
locales
Which languages your app speaks
["en", "vi", "ja"]
Shown on the app listing. Does NOT hide the app from anyone. The user’s language is in getContext().locale so the app can pick its strings.
regions
Which countries see your app
["*"], ["VN", "TH"]
Users outside these countries do not see the app in the catalog. "*" = worldwide.
platforms
Which devices run your app
["*"], ["web", "ipad"]
Orova Chat lists the app only on matching platforms. "*" = every platform.
The owner always sees their own Pocket in every country and on every platform, for testing.
Permissions
Storage, context, title, toast, close, formatting and the date picker need NO permission. Calling a method whose permission is not requested → permission_not_declared.
Permission
Allows
SDK
Kind
user.profile
See your name and profile photo
getUser()
Feature
conversation.pick
Pick one of your conversations to use in the app
pickConversation()
Feature
conversation.send
Send messages to a chat when you agree
sendToConversation()
Feature
share
Share content through Orova Chat
share()
Feature
open_url
Open external links
openUrl()
Feature
user.phone
See your phone number
getUser().phone
Sensitive
user.birthday
See your birthday
getUser().birthday
Sensitive
user.gender
See your gender
getUser().gender
Sensitive
user.address
See your address
getUser().address
Sensitive
user.company
See your company
getUser().company
Sensitive
user.website
See your website
getUser().website
Sensitive
user.locale_country
See your country and language
getUser().locale, .country
Sensitive
How users are asked
The first time a Pocket opens, Orova shows a dialog listing EVERY permission the app requests, with the reasons for sensitive ones. The app runs only after the user taps “Agree and open”; closing the dialog means the app does not open.
Consent covers the WHOLE set: there is no per-permission toggle. The app opens only after the user agrees to all of them; otherwise it does not run.
A new version that adds or changes permissions → users are asked again on the next open.
To withdraw, the user removes the Pocket (Remove Pocket in the Pocket info dialog in Chat, the Connected apps & Pockets page, or revoke_connected_pocket): every permission is revoked, the Pocket is unpinned, and the next open asks again. The API and MCP have no operation to grant or agree on the user’s behalf.
Permissions belong to the app: pick them and write the reasons in the console (Pocket details page) or with update_pocket. The pocket.json values are only a starting point.
Send, share and open-link dialogs still ask the user EVERY time, even with the permission granted. Orova never agrees on the user’s behalf.
SDK window.orova
One file, no dependencies, works in ES5 browsers with Promise. Every method that calls Orova returns a Promise; errors are Error objects with name "OrovaPocketError" and a code (see Error codes). Methods that show a dialog wait up to 120 s, all others 15 s, then reject with timeout.
theme — { theme: "light" | "dark" } when the user switches light/dark
Lifecycle and frame
orova.readyNo permission
orova.ready() → Promise<context>
Waits for the handshake with Orova, then resolves with the context (same as getContext). Safe to call many times. Calls made before the connection is ready are queued and sent automatically.
Returns
context
Errors
not_supported — Outside Orova it rejects with not_supported, immediately in a normal tab or after 3 s inside a non-Orova frame.
Sets the subtitle under your Pocket’s name in the header, 0–60 characters (empty string clears it).
Returns
null
Errors
invalid_params
js
orova.setTitle("Dinner · 4 people");
orova.toastNo permission
orova.toast(text) → Promise<null>
Shows a short Orova Chat toast, 1–120 characters, at most 5 per 10 seconds.
Returns
null
Errors
invalid_params, rate_limited
js
orova.toast("Saved");
orova.closeNo permission
orova.close() → Promise<null>
Closes your Pocket and returns to Orova Chat.
Returns
null
Errors
not_supported
js
doneButton.addEventListener("click", function () { orova.close(); });
orova.versionNo permission
orova.version → "1.0.0"
SDK version (a string, not a function). window.orova is frozen and cannot be overwritten.
Returns
string
Errors
—
js
console.log(orova.version); // "1.0.0"
User
orova.getUseruser.profile
orova.getUser() → Promise<user>
The first call asks the user. id is an anonymous ID unique to your Pocket: stable for the same user, different across Pockets. Data fields appear only when the user granted the matching permission (not granted → key absent; granted but empty → null).
orova.share({ text: "Join my poll", url: "https://example.com/poll/42" });
orova.openUrlopen_url
orova.openUrl(url) → Promise<{ opened: true }>
Asks “Open external link <host>?” and opens a new tab. https:// only, up to 2048 characters. A Pocket is a single-page app: never navigate the frame away (Orova closes the Pocket).
helpLink.addEventListener("click", function (e) {
e.preventDefault();
orova.openUrl("https://example.com/help");
});
Events
orova.onNo permission
orova.on(event, fn) → orova
Listens to an event from Orova; returns orova so calls can chain. Bad arguments throw TypeError. An error inside your handler is logged and does not affect other handlers.
Returns
orova
Errors
TypeError
js
function onTheme(d) { document.documentElement.dataset.theme = d.theme; }
orova.on("theme", onTheme);
orova.offNo permission
orova.off(event, fn?) → orova
Removes one handler; without fn removes every handler of that event.
Returns
orova
Errors
—
js
orova.off("theme", onTheme);
orova.off("theme"); // remove all
Storage
orova.storage.getNo permission
orova.storage.get(key) → Promise<value | null>
Reads a key from the private per-user, per-Pocket store. Missing → null.
Returns
JSON | null
Errors
invalid_params, network_error
js
orova.storage.get("score:best").then(function (v) {
best = v ? v.n : 0;
});
Orova-style numbers in every language: comma thousands, dot decimals. No decimals → up to 2, trailing zeros dropped; decimals 0–10 → fixed. Not a number → "". Synchronous, no host call.
Turns a text input into a date field with the Orova Chat calendar (month/year pickers, Today, Clear). The input shows dd/mm/yyyy; the real ISO value is in inputEl.dataset.iso. min/max are ISO dates. Enter / Space / ArrowDown open, Esc closes. REQUIRED instead of input type="date": native pickers follow the device language, not your app.
Returns
{ get(), set(iso), open(), close(), destroy() }
Errors
TypeError
js
var due = orova.ui.datePick("#due", {
min: "2026-01-01",
onChange: function (iso, text) { draft.due = iso; }
});
due.set("2026-11-07");
Error reporting
orova.track.errorNo permission
orova.track.error(msg, meta?) → undefined
Reports an error to your Pocket’s stats in the console. Never throws or rejects. msg is cut to 500 characters; meta is a JSON object ≤ 2000 characters (larger is dropped). The SDK captures window “error” and “unhandledrejection” by itself. At most 10 reports per page session.
Automatic code scan: crypto mining, obfuscated code, calls to hosts outside domains, forms posting elsewhere.
Content and behaviour are scored against Orova’s criteria; every finding must quote real text from your files.
Fixed rules decide: Approved → live right away; Unsure → a reviewer looks; Rejected → reasons per criterion (where, quote, how to fix).
Versions requesting sensitive user.* permissions are always checked by a reviewer by hand.
Never ask for passwords, OTP codes, payment cards or Orova sign-in details. Never send or share without a clear user action. No hidden features, misleading UI, malware, crypto mining, adult, hateful or illegal content.
Submitting and resubmitting are free. Orova may take down a Pocket that breaks the rules at any time.
Pocket API (REST)
Do everything the console does from code: create Pockets, edit details and translations, upload the icon and zip, get a sandbox link, submit, publish/unpublish, read stats, manage your developer profile; list and remove the Pockets you connected. Call it with an API key that has pockets:read / pockets:write — create a key, authentication.
After submitting, poll get_pocket_version for the status (in_review → live, needs_human, or rejected with reasons per criterion). Going to production needs an active upkeep; not enough balance → 402 maintenance_required.
MCP
AI assistants (Claude, ChatGPT…) connected over MCP get tools with the same names for the operations above, except the 2 binary uploads (upload_pocket_icon, upload_pocket_version) — use REST for those. See MCP