Skip to content

Mint Session Read Token

POST
/v1/sessions/{session_id}/read-token
curl --request POST \
--url https://agents.lumalabs.ai/v1/sessions/example/read-token \
--header 'Authorization: Bearer <token>'

Mint a ten-minute token that reads this session and nothing else.

For a browser page that follows one session without holding a credential that can write. It reads the session as its owner does, except that effective.callback_url reads null and metadata reads empty.

session_id
required
Session Id
string

Successful Response

Media typeapplication/json
SessionReadTokenResponse

A bearer token that reads one session for at most ten minutes.

It answers every GET under /v1/sessions/{id} and mints that session's stream handle; every write, every other session and every other route refuses it. What it reads leaves out the session's callback_url and metadata.

object
expires_in
required
Expires In

Seconds until the token expires: at most 600, never past the caller's own token.

integer
token
required
Token

Send as 'Authorization: Bearer '. Reads this session only.

string
Examplegenerated
{
"expires_in": 1,
"token": "example"
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"ctx": {},
"input": "example",
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}