curl -sS -X POST "$BMA_BASE_URL/v1/desktop_sessions/<desktop_session_id>/tickets" \
-H "x-api-key: $BMA_API_KEY" \
-H "bma-workspace-id: $BMA_PROJECT_ID" \
-H "content-type: application/json" \
-d '{}'{
"ticket": "<string>",
"ws_url": "<string>",
"type": "ticket",
"purpose": "watch",
"id": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"subprotocol": "<string>",
"permissions": [
"<string>"
],
"machine_id": "<string>",
"desktop_session_id": "<string>",
"viewer": "<string>",
"transport": "livekit",
"room": "<string>",
"publisher_identity": "<string>",
"viewer_identity": "<string>",
"input_identity": "<string>",
"control_available": true
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>"
},
"request_id": "<string>"
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>"
},
"request_id": "<string>"
}Desktop sessions
Mint a desktop watch credential
D-7 unified ticket endpoint. purpose defaults to and must be watch; the response is a ticket object. watch_tickets is the deprecated alias that answers desktop_watch_ticket.
POST
/
v1
/
desktop_sessions
/
{desktop_session_id}
/
tickets
curl -sS -X POST "$BMA_BASE_URL/v1/desktop_sessions/<desktop_session_id>/tickets" \
-H "x-api-key: $BMA_API_KEY" \
-H "bma-workspace-id: $BMA_PROJECT_ID" \
-H "content-type: application/json" \
-d '{}'{
"ticket": "<string>",
"ws_url": "<string>",
"type": "ticket",
"purpose": "watch",
"id": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"subprotocol": "<string>",
"permissions": [
"<string>"
],
"machine_id": "<string>",
"desktop_session_id": "<string>",
"viewer": "<string>",
"transport": "livekit",
"room": "<string>",
"publisher_identity": "<string>",
"viewer_identity": "<string>",
"input_identity": "<string>",
"control_available": true
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>"
},
"request_id": "<string>"
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "<string>",
"code": "<string>"
},
"request_id": "<string>"
}헤더
본문
application/json
Body of a desktop ticket. purpose is optional and must be watch.
응답
Success.
A transport-bound credential (D-7). BMA WebSocket tickets are single-use; LiveKit credentials support SDK reconnect with admission rechecked. purpose names what it opens (watch, connect; control is reserved).