Skip to content

Keys and scopes ​

Every API request is authenticated by a key or a user token. The key decides the tenant, the environment and what the request may do.

TypePrefixSent asUse
Secretvk_live_, vk_test_Authorization: BearerServer calls with full access to enabled products
Restrictedrk_live_, rk_test_Authorization: BearerServer calls with chosen scopes
Publishablevpk_live_, vpk_test_Vabu-Publishable-KeyBrowsers and apps
User tokenJWTAuthorization: BearerA customer or staff member

Scopes ​

Scopes have the form {product}:{read|write}, for example events:read or streams:write. The scope platform:* covers keys, webhooks and integrations. A secret key has every scope for the products you have enabled. A restricted key has only the scopes you choose.

A request without the scope gets a 403 permission_error. A request for a product that is off gets 403 product_not_enabled.

Principals per endpoint ​

Each endpoint states which principals it allows. The API reference shows this under each operation.

PrincipalMeaning
secretA secret key
restricted:<scope>A restricted key that has the scope
publishableA publishable key
customerA signed-in customer token
member:<permission>A staff member with the permission
operatorVabu platform staff, on the operator API

Which credentials each endpoint takes ​

Not every endpoint takes every credential. This is how the families split today. Each operation in the API reference also lists its own principals.

Endpoint familySecret keyRestricted keyPublishable keySigned-in userTest mode
API keys and webhook endpointsYesplatform:read or platform:writeNoTeam members with the right roleYes
Customers (/v1/customers)Yescustomers:read or customers:writeNoTeam members with the right roleYes
Access: entitlements and checksYesaccess:read or access:writeNoNoYes
Access: open, heartbeat and end a sessionYesaccess:write (heartbeat and end also take streams:write)Yes, with a customer tokenNoYes
Streams (/v1/streams/...)Yesstreams:read or streams:writeOnly POST /v1/streams/playback_tokens, with a customer tokenNoYes, on a simulated network
Public reads: GET /v1/events, GET /v1/events/{event}, GET /v1/plus/contents, GET /v1/plus/contents/{content}Yesevents:read or streams:readYesNot neededYes
Vabu ID sign-in (/auth/v1/...)Not neededNot neededOptional, to sign in as your customerSome routes need the access tokenYes
Everything else: booking, orders, tickets, organizer, creator, tenant staff and merch routesLive keys, as beforeLive keys, as beforeNoYes, with X-Tenant-CodeNot yet

For the last row, a request is made by a signed-in person (a Vabu ID or Payd ID token) with the tenant in the X-Tenant-Code header, or in Vabu-Tenant for a Vabu ID token. Some of these routes, such as browsing events and starting a checkout, need only the tenant header and no token. Test keys and publishable keys are refused on routes that do not list them, with 403 test_mode_unavailable or 403 insufficient_permissions. The product pages say which routes need what.

Lifecycle ​

  • Create. The full key is shown once. Vabu OS keeps a hash and an 8-character prefix.
  • Track. Each key records its last use, its creator, an optional expiry and an optional IP allowlist.
  • Roll. Rolling creates a new key and sets an expiry on the old one: immediately, or up to 7 days later.
  • Revoke. Revoking takes effect at once, and the change is audited. Your tenant owners get an email if a key was reported as leaked.

Keys are cached for up to 60 seconds for speed, and revocation clears that cache right away.

Vabu OS documentation