CustomDomain™ docs
Cloud browser

Trade the bootstrap code for the session token

Trade the bootstrap code for the session token: CustomDomain™ API reference in the cloud browser group. Covers parameters, request body and responses.

POST
/browser-sessions:redeem

The popup page calls this once, with the code from its address fragment. The code lives two minutes and works once; a second redemption answers 410 browser_link_used. The Origin header must be on the server's return origin allowlist (a browser sends it; a request with none is refused with browser_customer_present_only). The token it returns lives in the popup's memory only.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/browser-sessions:redeem" \  -H "Content-Type: application/json" \  -d '{    "code": "string"  }'
{  "session_id": "string",  "token": "string",  "view": {    "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",    "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    },    "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,      "formError": "string",      "focus": {        "x": 0,        "y": 0,        "w": 0,        "h": 0      },      "viewport": {        "w": 0,        "h": 0      }    },    "handback": {      "reason": "code"    },    "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,      "continue": "string",      "resend": "string",      "forgotUrl": "http://example.com"    }  }}
{  "code": "string",  "title": "string",  "details": "string"}
{  "code": "string",  "title": "string",  "details": "string"}
{  "code": "string",  "title": "string",  "details": "string"}
{  "code": "string",  "title": "string",  "details": "string"}