Your server authenticates with one of two credentials:
- a partner key (
vvp_test_…), long-lived, for your whole partner; - an access token (
vvat_…), short-lived, minted by your key for one account.
Send either one as a bearer token:
Authorization: Bearer vvp_test_…
What may reach a browser
Never send a partner key or an access token to a browser, a mobile app or any other device you do not control. Anyone who holds one can act as your server: a key in every account you have, a token in its account until it expires.
The only credential meant for a browser is a collab credential: it lets one browser
watch or use one session, and nothing else. Mint it on your server and hand the browser its
url (see Show a session in a browser).
| Credential | Where it lives | What it reaches |
|---|---|---|
Partner key vvp_test_… | Your server’s secret store | Every account of your partner |
Access token vvat_… | Your server, for minutes to hours | One account |
| Collab credential | One browser | One session |
VibeView never accepts a key or an access token in a URL or a query string.
To find which partner and environment a key or an access token belongs to (and, for a
token, its account), call GET /api/v1/partners/me with it
(API reference); it needs no scope.
Partner keys
Create a key
People with the Partner admin permission create keys on the Partner page of the dashboard (API keys, Create key). Each change asks them to confirm their identity first. Choose:
- a name, for your own records;
- the scopes the key needs (below). Give each key only what its server needs;
- an optional IP allowlist: networks in CIDR form, one per line (
203.0.113.0/24). A request from any other address is refused; - an optional expiry (30 days, 90 days or one year).
The key is shown once, when it is created, and cannot be shown again: if you lose it,
create a new one. The page lists each key with its first characters (prefix),
which are safe to show in your own logs and admin pages. Every Partner admin is emailed when a
key is created, given more scopes, or given a wider IP allowlist (or has its allowlist
removed).
A key that is used from an address outside its allowlist gets:
{
"detail": "This key does not accept requests from this address.",
"error": {
"code": "ip_not_allowed",
"message": "This key does not accept requests from this address.",
"request_id": "req_ef3886036335160455953775"
}
}
Rotate a key
Several keys can be live at once, so you can rotate without downtime:
- Create the new key and deploy it to your servers.
- Check on the Partner page that the old key’s last used time stops moving.
- Revoke the old key on the Partner page.
A revoked key stops working at once, everywhere, and so does every access token it minted:
{
"detail": "Invalid token",
"error": {
"code": "unauthenticated",
"message": "Invalid token",
"request_id": "req_b9de9eb2e30a1706a04dca4f"
}
}
A partner may have up to 25 live keys.
If a key leaks
- Revoke it on the Partner page. It stops working at once, with every access token it minted. If you cannot reach the page, email support@vibeview.io, who can revoke it for you.
- End what it started. Sessions it created keep running (they belong to the account),
and a collab credential it minted still lets a browser connect until its
expires_at. End those sessions with another key (DELETE /api/v1/sessions/{session_id}), or turn their collab credentials off (PUT /api/v1/sessions/{session_id}/collabwith{"enabled": false}). - Review what changed in your events feed: the accounts and sessions created, changed or ended since the key leaked.
- Create a new key with the scopes your server needs, and deploy it.
To make a leak less likely: keep keys in a secret manager, never log them (log the prefix
or the key’s id), give each server its own key with only the scopes it needs, and add an
IP allowlist where your servers have fixed addresses.
Access tokens
An access token acts in one account only, with some of your key’s scopes, for 60 seconds to 4 hours. Mint one when a part of your system works in one customer’s account, so it never holds a key that reaches every account.
POST /api/v1/partners/{ptn}/accounts/{org}/tokens, scope tokens:write (keys only).
| Field | Rules |
|---|---|
scopes | 1 to 32 account scopes (below), each held by the key that mints it. |
ttl_seconds | 60 to 14400. Default 3600. |
curl https://vibeview.io/api/v1/partners/$PTN/accounts/org_95aa9b33d49e3752/tokens \
-H "Authorization: Bearer $VIBEVIEW_KEY" \
-H 'Content-Type: application/json' \
-d '{"scopes":["sessions:read"],"ttl_seconds":900}'
{
"object": "access_token",
"id": "atok_8eee789f53f17b49",
"token": "vvat_…",
"account": "org_95aa9b33d49e3752",
"scopes": ["sessions:read"],
"expires_at": 1795270870
}
The token is shown once (the answer has Cache-Control: no-store) and cannot be shown
again. A token cannot exceed
the key that minted it:
{
"detail": "apps:read is not held by this key.",
"error": {
"code": "invalid_request",
"message": "apps:read is not held by this key.",
"field": "scopes",
"request_id": "req_4c388bf06f7eda8e11f8f943",
"scope": "apps:read",
"reason": "exceeds_key"
}
}
A partner scope (such as accounts:read) is refused the same way with
"reason": "not_mintable": a token never manages accounts, mints tokens or reads webhooks.
A token cannot mint another token, and it is refused (404 not_found) on every partner
route under /api/v1/partners/.
Revoke a token before it expires with
DELETE /api/v1/partners/{ptn}/accounts/{org}/tokens/{atok}:
{
"object": "access_token",
"id": "atok_8eee789f53f17b49",
"account": "org_95aa9b33d49e3752",
"revoked": true
}
It stops working at once (401 unauthenticated). Revoking it again is
404 access_token_not_found. You cannot mint a token for a suspended or deleting account
(403 account_suspended_by_partner, 403 account_deleting).
Acting in an account
Every request inside an account (sessions and devices) names the account:
- with an access token, nothing more: the token knows its account;
- with a partner key, add the
VibeView-Accountheader:
curl https://vibeview.io/api/v1/devices/pools \
-H "Authorization: Bearer $VIBEVIEW_KEY" \
-H 'VibeView-Account: org_95aa9b33d49e3752'
| What you send | Answer |
|---|---|
A key without VibeView-Account | 400 account_required |
| An id that is not one of your live accounts | 404 account_not_found |
A token with a VibeView-Account header of another account | 404 account_not_found |
VibeView-Organization (the dashboard’s header) with a partner credential | 400 organization_header_not_allowed |
| A session id of another account | 404 session_not_found |
The answer never tells you whether an id belongs to someone else: another partner’s account
and an account that does not exist get the same 404.
Scopes
A key holds 1 to 32 scopes. A request without the scope its route needs is refused, naming the scope:
{
"detail": "This request needs the sessions:write scope.",
"error": {
"code": "insufficient_scope",
"message": "This request needs the sessions:write scope.",
"request_id": "req_756dd46a89db53f22cae06e6",
"required_scope": "sessions:write"
}
}
Partner scopes (on keys only, never on an access token):
| Scope | Lets the key |
|---|---|
accounts:read | List and read accounts, and list your shares and embed keys. |
accounts:write | Create, update, suspend, resume and delete accounts. |
tokens:write | Mint and revoke access tokens. |
webhooks:read | Read webhook endpoints, events and deliveries. |
webhooks:write | Retry a delivery and resend events to an endpoint. |
partner_usage:read | Read every account’s usage records (GET /api/v1/partners/{ptn}/usage). |
Account scopes (on keys, and mintable into access tokens):
| Scope | Lets the credential |
|---|---|
sessions:read | List device offerings, list and read sessions, read a session’s collaboration status. |
sessions:write | Create, start, hold, drive and end sessions, install a newer build into a session (POST /api/v1/sessions/{session_id}/install), and mint collab credentials. |
apps:read | List and read the apps the account can start sessions on (GET /api/v1/apps/) and the builds of its own apps (GET /api/v1/app-builds). Allowed by a contract with sessions, embedding or builds. |
apps:write | Upload the account’s own apps and their builds (POST /api/v1/apps/upload, POST /api/v1/apps/{app_id}/builds), delete them (DELETE /api/v1/apps/{app_id}, DELETE /api/v1/app-builds/{public_id}) and register its apps (PUT /api/v1/apps/by-external-key/{key}/{platform}). Allowed by a contract with sessions, embedding or builds. |
builds:read | List and read the account’s builds, their logs and their files (GET /api/v1/builds/…), read the build numbers of the account’s own apps (GET /api/v1/apps/{app_id}/versions) and list the account’s build variables (GET /api/v1/build-env/). Needs a contract with builds. |
builds:write | Start a build from a template (POST /api/v1/builds/from-template) or from the account’s own source (POST /api/v1/builds/from-source) and cancel a build (POST /api/v1/builds/{public_id}/cancel), set the build numbers of the account’s own apps (PUT /api/v1/apps/{app_id}/versions/{platform}), and set, edit and delete the account’s build variables (/api/v1/build-env/). A build that asks to be sent to a store (submit) also needs submissions:write. Needs a contract with builds. |
usage:read | Read the account’s own usage records (GET /api/v1/usage). Your contract never turns it off. |
embed:read | List and read the embed keys of the account’s own apps (GET /api/v1/app-embed-keys), never a visitor secret. Needs a contract with embedding. |
embed:write | Create, change, revoke and rotate the embed keys of the account’s own apps (/api/v1/app-embed-keys). Needs a contract with embedding (revoking a key does not). See Embedding a device in your product. |
store_keys:metadata | List the account’s Google Play and App Store Connect keys, never the key files. Allowed by a contract with submissions. |
store_keys:write | Upload, replace, delete and check the account’s Google Play and App Store Connect keys. Also needed, with signing:write, to generate an Apple certificate or delete one with revoke_certificate=true: both act in the customer’s Apple team with the account’s App Store Connect key. Allowed by a contract with submissions. See Store accounts. |
submissions:read | List and read the account’s store submissions and their logs (GET /api/v1/submissions), a finished TestFlight distribution’s groups, and an iOS or Apple TV app’s TestFlight details (GET /api/v1/apps/{app_id}/testflight). Needs a contract with submissions. See Store accounts. |
submissions:write | Send the account’s builds to Google Play or TestFlight (POST /api/v1/submissions, and a build’s submit on POST /api/v1/builds/from-template and POST /api/v1/builds/from-source), and manage TestFlight after the upload: Check again, Stop following, more groups, an app’s export-compliance answer, test information, Beta App Review contact and new groups (see Publishing to stores). Needs a contract with submissions; builds:write alone never publishes. See Publishing to stores. |
signing:metadata | List the account’s signing credentials, never a key file or a password. Needs a contract with builds. |
signing:write | Upload, replace, generate and delete the account’s Android keystores and Apple certificates. Never returns a file or a password. Generating an Apple certificate, and deleting one with revoke_certificate=true, also need store_keys:write. Needs a contract with builds. See Builds. |
Any key of your partner can read your contract (GET /api/v1/partners/{ptn}/contract),
whatever its scopes.
Coming soon. A key can already hold this one, but no route uses it yet:
templates:publish.
A scope whose capability is not in your contract is refused with
403 capability_disabled, even when the key holds it. One exception: a key or token that holds
embed:write can still revoke an account’s embed key after your contract stops including
embedding.
Keys and your own people
Keys are for servers. The people of your organization use the dashboard: Partner operator can read the Partner page, Partner admin can also create and revoke keys, manage webhook endpoints and export the keystores and Apple certificates VibeView generated for your accounts. A key can never create, change or revoke keys, or change where events go, so a leaked key cannot widen itself. Ask support@vibeview.io to grant or remove a permission.