REST API
REST API reference
Thirteen endpoints on the cloud path. Ten of them you call as an account — creating apps, and the consent and revocation flow. Three you call as the app itself, carrying a capability token.
雲通路上的十三個接口。其中十個以帳號身份調用——建立應用、同意與撤銷流程;三個以應用身份調用,攜帶能力令牌。
Base URL and authentication
https://api.vyslo.ai:8443/api/v1/app
| Acting as | Header | Endpoints |
|---|---|---|
| An account — the developer, or the user giving consent | Authorization: Bearer <accessToken> |
/open/* except /open/ext/* |
| The app, on behalf of one user | X-Vyslo-Token: <capability token> |
/open/ext/* |
| 以什麼身份 | 請求頭 | 接口範圍 |
|---|---|---|
| 帳號——開發者本人,或正在同意授權的用戶 | Authorization: Bearer <accessToken> |
/open/*,/open/ext/* 除外 |
| 應用,代表某一個用戶 | X-Vyslo-Token: <能力令牌> |
/open/ext/* |
- Request and response bodies are JSON; timestamps are ISO-8601 in UTC.
- Endpoints that only mutate state answer
204 No Contentwith an empty body. - The two header schemes are not interchangeable. An
/open/ext/*call with a Bearer token is unauthenticated as far as that endpoint is concerned. - Account tokens come from
POST /auth/sms/sendthenPOST /auth/login— see the Quickstart.
- 請求與回應體皆為 JSON;時間戳為 UTC 的 ISO-8601。
- 只改狀態的接口返回
204 No Content,回應體為空。 - 兩套請求頭不可互換:用 Bearer 調
/open/ext/*,對該接口而言等於未鑑權。 - 帳號令牌來自
POST /auth/sms/send再POST /auth/login,見快速接入。
App management (account)
Create an app. Self-serve; the new app starts in sandbox.
建立應用。自助註冊;新應用為 sandbox 態。
- name
- 1–64 characters, required
- requestedScopes
- Scope bitmap; undefined bits are rejected. Ask only for what you use
- callbackUris
- Callback allowlist, up to 10 entries of ≤512 characters each. Empty means the app cannot be authorized
Returns appId, status, createdAt, appSecret (this response only) and webhookSecret.
返回 appId、status、createdAt、appSecret(僅此一次)與 webhookSecret。
Your own apps. Secrets are omitted — appSecret and webhookSecret come back null here.
你自己的應用列表。不返回密鑰——此處 appSecret 與 webhookSecret 為 null。
Name, status and requested scopes of any app, for rendering a consent screen. Readable by any signed-in account, not just the owner.
任一應用的名稱、狀態與申請權限,用於渲染同意頁。任何已登入帳號皆可讀,不限 owner。
Owner only. {"url":"https://…"} must be an http(s) URL; an empty string clears it. 204 on success.
僅 owner。{"url":"https://…"} 必須是 http(s) 地址;傳空串即清除。成功返回 204。
Owner only. {"callbackUris":[…]} replaces the whole allowlist. 204 on success.
僅 owner。{"callbackUris":[…]} 整表替換。成功返回 204。
Consent and revocation (account)
The user grants an app and a capability token is issued.
{"appId":42,"scopes":17,"callback":"notesbot://vyslo-auth"} →
{"token":"…","issuedAt":"…"}.
用戶向應用授權並簽發能力令牌。
{"appId":42,"scopes":17,"callback":"notesbot://vyslo-auth"} →
{"token":"…","issuedAt":"…"}。
- Scopes that land in the token
- requested ∩ what the app registered. An empty intersection is refused — tampering cannot widen it
- Sandbox apps
- Only the app's own owner can authorize it
- Banned apps
- Always refused
- callback
- Must hit the allowlist; checked before any token is issued
Re-issue a token for {"appId":42} while the grant stands. The app-side equivalent is /open/ext/token/renew, which needs no account token.
在授權仍有效時為 {"appId":42} 重新簽發令牌。應用側的等價接口是 /open/ext/token/renew,不需要帳號令牌。
The signed-in user's connected apps: appId, appName, appStatus, scopes, grantedAt. This is what the app's "authorized apps" screen renders.
當前用戶已連接的應用:appId、appName、appStatus、scopes、grantedAt。App 的「已授權的應用」頁就用它。
{"appId":42} revokes the grant and appends the app to this user's revocation list, bumping its version. 204 on success; subsequent app calls are refused immediately.
{"appId":42} 撤銷授權,並把該應用加入此用戶的撤銷單、版本號 +1。成功返回 204;該應用後續調用立即被拒。
{"version":7,"revokedAppIds":[…],"updatedAt":"…"} — the revocation list for this
user, which an online client relays to the card. version is monotonic so a card can
reject a replayed older list.
{"version":7,"revokedAppIds":[…],"updatedAt":"…"}——該用戶的撤銷單,由任一在線客戶端
轉達給卡片。version 單調遞增,卡片可據此拒絕被回放的舊單。
Data plane (app)
These three need no account token — only X-Vyslo-Token. Each one re-checks the grant
on every call: revoked grant or banned app means 403, even with a token that has not
expired yet.
這三個接口不需要帳號令牌,只要 X-Vyslo-Token。每次調用都重新校驗授權:授權已撤銷或應用被封禁
即返回 403,即使令牌尚未過期。
Trade the current token for a fresh one, no body. Call it roughly weekly; the token itself is the credential.
用當前令牌換一枚新的,無請求體。大約每週調用一次;令牌本身就是憑證。
Needs recordings.read. One recording of the authorizing user, with transcript segments and summary lines.
需 recordings.read。返回授權用戶名下某一條錄音的轉寫分段與摘要要點。
- recordingId, title, status, recordedOn, timeLabel, createdAt
- Metadata; missing values come back as empty strings, not null
- ownerVerified, svVerdict
- Cloud voiceprint review. ownerVerified is svVerdict == "owner", not a per-recording proof signed by the card
- segments[]
- speaker, text, timestamp, in order
- summaryLines[]
- Summary points; an empty array when there is no summary
404 covers all of: no such recording, not this user's, or visibility is not visible.
404 同時涵蓋:錄音不存在、不屬於該用戶、或 visibility 不是 visible。
Needs recordings.audio, which the user grants separately from reading text. Streams
the stored file with Content-Disposition: attachment; the type follows the file
(audio/ogg for Opus, audio/wav, audio/mpeg, otherwise
audio/mp4). 404 when there is no stored audio.
需 recordings.audio,用戶需在讀取文字之外單獨授權。以
Content-Disposition: attachment 流式返回已存檔案;類型隨檔案而定
(Opus 為 audio/ogg,另有 audio/wav、audio/mpeg,
其餘為 audio/mp4)。沒有已存音頻時返回 404。
Errors
| Status | Means | What to do |
|---|---|---|
400 | Invalid input: name length, undefined scope bit, callback not registered, non-http webhook URL, no permission on that app | Fix the request; do not retry unchanged |
401 | Missing or expired credential — no Bearer token, or an invalid/expired capability token | Log in again, or re-authorize |
403 | The grant was revoked, the app is banned, or the grant lacks the scope this endpoint needs | Drop the token and send the user through authorization |
404 | Not found, or not yours to read | Treat as gone; do not probe |
| 狀態碼 | 含義 | 怎麼辦 |
|---|---|---|
400 | 入參不合法:名稱長度、未定義的權限位、回跳地址未登記、webhook 不是 http 地址、對該應用無權限 | 修正請求,不要原樣重試 |
401 | 憑證缺失或過期——沒有 Bearer 令牌,或能力令牌無效 / 已過期 | 重新登入,或重新授權 |
403 | 授權已被撤銷、應用被封禁,或授權缺少該接口所需權限 | 丟棄令牌,引導用戶重新授權 |
404 | 不存在,或不是你能讀的 | 視為已消失,不要試探 |
Limits
| Item | Limit |
|---|---|
| App name | 1–64 |
| Callback allowlist | Up to 10 entries, ≤512 characters each |
| Capability token lifetime | 60 days from issue |
| Suggested renewal interval | 7 days |
| Webhook retries | 3 attempts, 2s / 8s backoff, 10s per attempt |
| Billing | None. Quotas govern abuse, not usage |
An OpenAPI description of these endpoints is available; ask support@vyslo.ai for the current file. This page is the reference.
這些接口的 OpenAPI 規範已可提供,寫信到 support@vyslo.ai 索取最新檔案。以本頁為準。