Skip to main content
POST
/
sessions
/
{session_id}
/
public-share
Create Session Public Share
const options = {method: 'POST', headers: {'X-Browser-Use-API-Key': '<api-key>'}};

fetch('https://api.browser-use.com/api/v2/sessions/{session_id}/public-share', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "shareToken": "<string>",
  "shareUrl": "<string>",
  "viewCount": 123,
  "lastViewedAt": "2023-11-07T05:31:56Z"
}

Authorizations

X-Browser-Use-API-Key
string
header
required

Path Parameters

session_id
string<uuid>
required

Response

Successful Response

View model for representing a public share of a session.

shareToken
string
required

Token to access the public share

shareUrl
string
required

URL to access the public share

viewCount
integer
required

Number of times the public share has been viewed

lastViewedAt
string<date-time> | null

Timestamp of the last time the public share was viewed (None if never viewed)