Skip to main content
POST
/
v1
/
sandboxes
/
{id}
/
desktop
/
viewer
/
session
Renew the public managed desktop viewer session
import requests

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

response = requests.post(url)

print(response.text)
{
  "sandbox_id": "<string>",
  "auth_key": "<string>",
  "viewer_url": "<string>",
  "ws_url": "<string>",
  "view_only": true,
  "expires_at": "2023-11-07T05:31:56Z"
}

Path Parameters

id
string
required

Sandbox ID (e.g. sb_a1b2c3d4)

Query Parameters

auth
string
required

Short-lived managed desktop viewer auth token returned by /desktop/stream/start, /desktop/stream/auth-key, or /desktop/viewer/session.

Response

Refreshed viewer session details for browser bootstrap and reconnect. The response returns a renewed auth_key, a matching viewer_url, and the current websocket bridge URL without requiring the normal API bearer key. In edge mode these URLs point at the edge-owned desktop host rather than the API origin.

sandbox_id
string
required
auth_key
string
required
viewer_url
string
required

Renewed public managed viewer URL for the current session. In edge mode this points to the edge-owned desktop host.

ws_url
string
required

Renewed websocket bridge URL for the current session. In edge mode this points to the edge-owned desktop host websocket path.

view_only
boolean
required
expires_at
string<date-time>
required