Update Session Share
Toggle the session’s share link on/off.
PUT
/
sessions
/
{session_id}
/
share
Update Session Share
const options = {
method: 'PUT',
headers: {'X-Browser-Use-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({isActive: true})
};
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 PUT \
--url https://api.browser-use.com/api/v4/sessions/{session_id}/share \
--header 'Content-Type: application/json' \
--header 'X-Browser-Use-API-Key: <api-key>' \
--data '
{
"isActive": true
}
'import requests
url = "https://api.browser-use.com/api/v4/sessions/{session_id}/share"
payload = { "isActive": True }
headers = {
"X-Browser-Use-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, 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
Body
application/json
Was this page helpful?
⌘I
Update Session Share
const options = {
method: 'PUT',
headers: {'X-Browser-Use-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({isActive: true})
};
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 PUT \
--url https://api.browser-use.com/api/v4/sessions/{session_id}/share \
--header 'Content-Type: application/json' \
--header 'X-Browser-Use-API-Key: <api-key>' \
--data '
{
"isActive": true
}
'import requests
url = "https://api.browser-use.com/api/v4/sessions/{session_id}/share"
payload = { "isActive": True }
headers = {
"X-Browser-Use-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, 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>"
}
]
}