POST /v1/vision/sessions/{session_id}/ticket
Returns a single-use ticket, valid for 30 seconds, that opens the session's CDP socket without a bearer header (for browsers and CDP clients that cannot set headers). Pass it as `?ticket=` or in `Sec-WebSocket-Protocol: b3os.v1, b3os.ticket.<ticket>`. The socket runs with this caller's scopes.

Authentication

Bearer Token (b3os_sk_ API key or b3os_pat_ token) API Key (cookie: __Host-b3os_session)

Path Parameters

session_id string required path
The session ID (`brs_…`).
Example: "brs_01m5t3y30wcksxf22t9gwk9fwb"

Responses

200 The ticket.
application/json
ticket string REQUIRED
The ticket. Treat it like a password until it is used.
object string REQUIRED
Enum: stream_ticket
resource string REQUIRED
Absolute API path the ticket opens streams under.
expires_in_s integer REQUIRED
Seconds until the ticket expires if unused.
400 The request failed validation (`invalid_request`, `invalid_url`).
401 Missing, malformed, expired or revoked credentials (`unauthorized`).
403 Authenticated but not allowed (`forbidden`, `egress_denied`).
404 No such browser session in this project (`session_not_found`).
409 The session already closed (`session_closed`).
429 A rate, concurrency or quota limit applies (`rate_limited`, `concurrency_limited`, `quota_exceeded`).
500 Something failed inside B3OS (`internal`). Retry with backoff.
503 The node or the product is not available right now (`node_unavailable`, `product_unavailable`, `capacity_unavailable`).
curl -X POST 'https://beta-api.b3os.org/v1/vision/sessions/brs_01m5t3y30wcksxf22t9gwk9fwb/ticket' \  -H 'Authorization: Bearer YOUR_API_TOKEN'
const response = await fetch('https://beta-api.b3os.org/v1/vision/sessions/brs_01m5t3y30wcksxf22t9gwk9fwb/ticket', {  method: 'POST',  headers: {      "Authorization": "Bearer YOUR_API_TOKEN"  }});const data = await response.json();console.log(data);
import requestsheaders = {    'Authorization': 'Bearer YOUR_API_TOKEN'}response = requests.post('https://beta-api.b3os.org/v1/vision/sessions/brs_01m5t3y30wcksxf22t9gwk9fwb/ticket', headers=headers)print(response.json())
200 Response
{  "ticket": "tkt_01m5t6sj6e7qn0hz2drg2sgec4",  "object": "stream_ticket",  "resource": "/v1/vision/sessions/brs_01m5t3y30wcksxf22t9gwk9fwb",  "expires_in_s": 30}
Ask a question... ⌘I