The session token a console user reads with: everything on the stream, landing nothing. Any member of the tenant may read its sessions.
POST
/console/sessions/{id}/token
const url = 'https://api.canopyhq.dev/console/sessions/000000000000000000000000000000000000000000000000000000000000000000000000/token';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.canopyhq.dev/console/sessions/000000000000000000000000000000000000000000000000000000000000000000000000/token \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
A stream id: 72 hex chars, the shard then the owner digest.
string
The session to read.
Responses
Section titled “Responses”A read-only token for the session.
Media typeapplication/json
object
expires
required
integer format: int64
session
required
A stream id: 72 hex chars, the shard then the owner digest.
string
token
required
string
Example
{ "session": "000000000000000000000000000000000000000000000000000000000000000000000000"}No console token, or one that did not verify.
No such session under this tenant.