Tokens
Create a one-time token
Create a single-use, short-lived bearer token from your Inworld API key. Use it to authenticate one HTTP request or WebSocket connection from a browser or mobile app.
/auth/v1/tokensMust be true. Only single-use tokens are supported; the token is consumed by its first successful authentication.
How long the token stays valid, as a duration in seconds (e.g. "300s"). Minimum 1 second, maximum 1 hour; defaults to 15 minutes. Mutually exclusive with expire_time.
Absolute expiry timestamp, as an alternative to ttl. Capped at 1 hour from now. Mutually exclusive with ttl.
The token's resource name, tokens/{token}. This is the token's stable ID — safe to log and correlate on.
The bearer credential. Returned only in this response and never stored — send it as Authorization: Bearer <accessToken>, or as Sec-WebSocket-Protocol: bearer_<accessToken> on browser WebSocket connections.