Create Session Public Share
Create or return existing public share for a session.
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));curl --request POST \
--url https://api.browser-use.com/api/v2/sessions/{session_id}/public-share \
--header 'X-Browser-Use-API-Key: <api-key>'import requests
url = "https://api.browser-use.com/api/v2/sessions/{session_id}/public-share"
headers = {"X-Browser-Use-API-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text){
"shareToken": "<string>",
"shareUrl": "<string>",
"viewCount": 123,
"lastViewedAt": "2023-11-07T05:31:56Z"
}{
"detail": "Session not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Path Parameters
Response
Successful Response
View model for representing a public share of a session.
Was this page helpful?
⌘I
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));curl --request POST \
--url https://api.browser-use.com/api/v2/sessions/{session_id}/public-share \
--header 'X-Browser-Use-API-Key: <api-key>'import requests
url = "https://api.browser-use.com/api/v2/sessions/{session_id}/public-share"
headers = {"X-Browser-Use-API-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text){
"shareToken": "<string>",
"shareUrl": "<string>",
"viewCount": 123,
"lastViewedAt": "2023-11-07T05:31:56Z"
}{
"detail": "Session not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}