CustomDomain Docs
API referenceAPI referenceCloud browser

Read a cloud browser session

Read a cloud browser session: CustomDomain™ API reference in the cloud browser group. Covers request parameters, the request body, responses and error codes.

GET
/browser-sessions/{sid}

The session view. Every call is the popup's heartbeat: a session that is not polled for 90 seconds before approval is ended and its browser released. The response is Cache-Control: no-store, because the view can carry the live view address, which anyone holding can drive.

Once the session has kept a lasting API key for the connection, the view carries kept_key: the key's name, the provider's page that deletes keys, its rights and when it ends (expires_at), so the last screen can say which key was kept and where to remove it. When no key was made because the provider's page still listed the row of one an earlier sign in made for this account and the key stored for it was used, kept_key.reused is true and the name is that key's. A key that was made and not kept is left_key instead.

With an API key instead (the console's own call, on its signed visitor forward, for the member who started it), the route answers an account sign in's state instead of the popup's view (AccountSignInSession): no live view address, no token, no domain. While the key waits for the keep step (key_ready) it carries the zones the key lists, what the key is (key) and when the wait ends (deadline); after an end that left the key at the provider it carries left_key. A session of another workspace or another member, a connect session and an unknown id are all 404, and a viewer is 403. Any other credential, an API key without the console's forward included, is read as the popup's: a widget token, an agent token, the operator's key and such an API key fail the token check (401). Reading it is not a heartbeat.

Authorization

AuthorizationBearer <token>

The session token of one cloud browser sign in, returned by POST /browser-sessions:redeem. It binds one session, one connection and one workspace, lives at most as long as the session, and stops working the moment the session ends. It lives in the popup's memory only.

In: header

Path Parameters

sid*string

The cloud browser session id, bs_ and 32 hex characters.

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/browser-sessions/string"
{  "id": "string",  "state": "created",  "provider": "string",  "provider_name": "string",  "vendor": "string",  "domain": "string",  "site": "string",  "interactive": true,  "live_view_url": "http://example.com",  "live_view_origin": "string",  "relay_socket": "string",  "relay_target": "string",  "deadline": "2019-08-24T14:15:22Z",  "plan": {    "hash": "string",    "base_hash": "string",    "changes": [      {        "op": "add",        "type": "string",        "name": "string",        "old": "string",        "new": "string",        "ttl": 0,        "priority": 0,        "reason": "string"      }    ],    "unchanged": 0,    "approve_by": "2019-08-24T14:15:22Z"  },  "manual": {    "records": [      {        "type": "string",        "name": "string",        "value": "string",        "ttl": 0,        "present": true      }    ],    "guide_url": "string"  },  "notice": "not_signed_in",  "wrongAccount": {    "account": "string",    "tried": 1,    "max": 0  },  "left_key": {    "name": "string",    "page": "http://example.com"  },  "kept_key": {    "name": "string",    "page": "http://example.com",    "rights": [      "transfer"    ],    "expires_at": "2019-08-24T14:15:22Z",    "reused": true  },  "api_activation": {    "kind": "order",    "terms": "http://example.com"  },  "key_replaces": true,  "error": {    "code": "string",    "message": "string"  },  "sign_in_viewport": {    "width": 0,    "height": 0  },  "work_viewport": {    "width": 0,    "height": 0  },  "sign_in_frame": 1,  "signed_in_detected": true,  "check": true,  "signals": {    "host": "string",    "hostVerified": true,    "field": {      "kind": "username",      "label": "string",      "maxLength": 1    },    "codePrompt": {      "kind": "sms",      "digits": 4    },    "push": true,    "linkPrompt": true,    "social": [      "google"    ],    "passkey": true,    "check": true,    "socialRefused": "google",    "formError": "string",    "focus": {      "x": 0,      "y": 0,      "w": 0,      "h": 0    },    "viewport": {      "w": 0,      "h": 0    }  },  "handback": {    "reason": "code",    "relay": true,    "rejected": true  },  "form": {    "identifier": "email",    "steps": [      {        "fields": [          {            "kind": "username",            "selector": "string"          }        ],        "submit": "string"      }    ],    "social": {      "google": "string",      "apple": "string",      "facebook": "string",      "amazon": "string",      "microsoft": "string",      "github": "string",      "property1": "string",      "property2": "string"    },    "passkeyAlt": "string",    "emailLink": true,    "keyTyped": true,    "continue": "string",    "resend": "string",    "forgotUrl": "http://example.com",    "consent": "string"  },  "password_again": {    "field": "string",    "submit": "string"  },  "no_live_page": true,  "live_check": true,  "idp": {    "provider": "google",    "domain": "string",    "connection_id": "string",    "handoff_code": "string",    "state": "starting",    "error_code": "string"  }}
{  "code": "account_not_verifiable",  "title": "string",  "details": "string",  "request_id": "string",  "challenge": {    "value": "string",    "bits": 1,    "expires_at": "2019-08-24T14:15:22Z"  }}
{  "code": "account_not_verifiable",  "title": "string",  "details": "string",  "request_id": "string",  "challenge": {    "value": "string",    "bits": 1,    "expires_at": "2019-08-24T14:15:22Z"  }}
{  "code": "account_not_verifiable",  "title": "string",  "details": "string",  "request_id": "string",  "challenge": {    "value": "string",    "bits": 1,    "expires_at": "2019-08-24T14:15:22Z"  }}