<llms-only>
> For the complete documentation index, see [llms.txt](https://www.assemblyai.com/docs/llms.txt)
</llms-only>
Generates a temporary authentication token for use with streaming services. See [Authenticate with a temporary token](https://www.assemblyai.com/docs/streaming/authenticate-with-a-temporary-token) for more details.
Query parameters
expires_in_secondsintegerRequired1-600
Token redemption window, in seconds. The token must be used to open a WebSocket connection within this window. If the window has elapsed when the WebSocket is opened, the server rejects the session on the first frame. This does NOT cap the duration of the resulting streaming session — once the WebSocket is open the session runs for up to `max_session_duration_seconds`.
max_session_duration_secondsintegerOptional60-10800Defaults to 10800
Maximum duration of the streaming session started with this token, in seconds. If you need to finalize work before the session ends, run a client-side timer using the value you passed here.
Response
Successfully generated temporary token
tokenstring
The temporary authentication token
expires_in_secondsinteger
The token redemption window in seconds — the time the client has to use this token to open a WebSocket before it expires unused. This is not the session duration; see max_session_duration_seconds for that.