Create Session Share
Enable sharing: reactivates the session’s existing share (stable token, so a link that was toggled off keeps working when re-enabled) or creates one on first use.
POST
/
sessions
/
{session_id}
/
share
Create Session Share
const options = {method: 'POST', headers: {'X-Browser-Use-API-Key': '<api-key>'}};
fetch('https://api.browser-use.com/api/v4/sessions/{session_id}/share', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.browser-use.com/api/v4/sessions/{session_id}/share \
--header 'X-Browser-Use-API-Key: <api-key>'import requests
url = "https://api.browser-use.com/api/v4/sessions/{session_id}/share"
headers = {"X-Browser-Use-API-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"shareToken": "<string>",
"sessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"isActive": true,
"viewCount": 123,
"createdAt": "2023-11-07T05:31:56Z",
"shareUrl": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Path Parameters
Was this page helpful?
⌘I
Create Session Share
const options = {method: 'POST', headers: {'X-Browser-Use-API-Key': '<api-key>'}};
fetch('https://api.browser-use.com/api/v4/sessions/{session_id}/share', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.browser-use.com/api/v4/sessions/{session_id}/share \
--header 'X-Browser-Use-API-Key: <api-key>'import requests
url = "https://api.browser-use.com/api/v4/sessions/{session_id}/share"
headers = {"X-Browser-Use-API-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"shareToken": "<string>",
"sessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"isActive": true,
"viewCount": 123,
"createdAt": "2023-11-07T05:31:56Z",
"shareUrl": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}