Skip to content

Mint a cookie-free token for the published app

POST
/api/workspaces/{workspaceId}/apps-v2/{id}/view-token

Viewing a published app happens in a sandboxed, opaque-origin iframe, and ES modules are always fetched in CORS mode WITHOUT credentials — so a cookie-authorized URL 401s there however well it works in a normal tab, and the app renders nothing. This returns the same kind of short-lived token the build preview uses, authorized here by the caller’s workspace access. It starts no sandbox: the bytes come from the deployment store.

workspaceId
required
string
id
required
string

Successful response

object
success

Whether the request succeeded.

boolean
data

Endpoint-specific response payload.

message
string
Example
Operation completed
error
string
Example
Error message

Invalid request

object
success
boolean
error
string
Example
Error message

Internal server error

object
success
boolean
error
string
Example
Error message