Create client token
Create a new client token for browser-to-API communication. Returns the plain token value once.
Authentication
AuthorizationBearer
API key or Clerk session token
Request
This endpoint expects an object.
allowedOrigins
Allowed request origins for this token. Each entry is an exact origin (https://app.example.com), a wildcard subdomain (https://*.example.com), '*' for all origins, or the literal 'native' — a sentinel that admits requests carrying NO Origin header (native mobile apps). A token with 'native' has effectively no origin protection and relies on its capability scope.
name
agentIds
config
defaultFlowId
environment
Allowed values:
flowIds
maxMessagesPerSession
pinToVersion
productSurfaceId
rateLimitPerHour
rateLimitPerMinute
sessionIdleTimeoutMinutes
Response
Created client token
clientToken
token
warnings
Errors
400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
500
Internal Server Error