Authentication

Every API request carries one header:

Authorization: Bearer <token>

The token is either an API key or a browser token (scoped JWT).

API keys

API keys have the prefix msk_ followed by a role segment:

PrefixRoleUse
msk_u_...userGeneral-purpose server-side calls
msk_a_...adminOperator/platform tooling
msk_p_...platformTenant-wide automation

API keys are server-side only. Never put an msk_* key in browser code, a mobile app, or a public repository.

Browser tokens

For browser-side access - embedding a preview, opening a terminal in an iframe - your backend mints a short-lived scoped token and passes it to the client:

Browser tokens expire, are non-renewable, and are scoped to a single resource. They cannot create new resources.

See Authentication and Browser Tokens for the full reference.

Token types

MIOSA issues five distinct token types. Each covers a different caller and trust level:

TokenPrefixCallerTTLRead / Write
API keymsk_*Your serverUntil revokedRead + Write
JWTey...Admin UI / browser session~1 h (refresh 7 d)Read + Write
Browser token(opaque)Your user’s browserConfigurable (default 1 h)Read-only, single resource
Preview tokenmp_*Browser / <MiosaPreview> iframeConfigurable (default 1 h)Read-only, sandbox preview
Share tokenms_*Anyone - no account requiredConfigurableRead-only, sandbox preview

The msk_* API key is the root credential. All other token types are minted downstream from it by your server. Never give an msk_* key to a browser or end user.

For minting flows, revocation, and validation rules see Authentication and Preview Tokens.

Was this page helpful?