Skip to main content
POST
/
v1
/
sandboxes
/
{id}
/
desktop
/
stream
/
start
Start or rotate the preferred managed desktop viewer session
import requests

url = "https://api.13-215-85-171.sslip.io/v1/sandboxes/{id}/desktop/stream/start"

payload = { "view_only": True }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
{
  "protocol": "<string>",
  "viewer_url": "<string>",
  "auth_key": "<string>",
  "view_only": true,
  "expires_at": "2023-11-07T05:31:56Z",
  "host": "<string>",
  "port": 123,
  "url": "<string>",
  "vnc_url": "<string>"
}

Authorizations

Authorization
string
header
required

API key passed as Bearer token

Path Parameters

id
string
required

Sandbox ID (e.g. sb_a1b2c3d4)

Body

application/json
view_only
boolean

Response

201 - application/json

Managed desktop viewer session started. When raw VNC is not public, the raw host, port, and VNC URL fields may be omitted while the managed viewer URL and auth token remain available.

protocol
string
required
viewer_url
string
required

Public managed viewer URL. In edge mode this points to the reserved desktop-{sandbox_id} edge host rather than the API origin.

auth_key
string
required
view_only
boolean
required
expires_at
string<date-time>
required
host
string | null
port
integer<uint16> | null
url
string | null
vnc_url
string | null