curl --request DELETE \
--url https://app.base44.com/api/service/socket-sessions/{session_id}/rooms/{app_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.base44.com/api/service/socket-sessions/{session_id}/rooms/{app_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.base44.com/api/service/socket-sessions/{session_id}/rooms/{app_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.base44.com/api/service/socket-sessions/{session_id}/rooms/{app_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.base44.com/api/service/socket-sessions/{session_id}/rooms/{app_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://app.base44.com/api/service/socket-sessions/{session_id}/rooms/{app_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/service/socket-sessions/{session_id}/rooms/{app_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"session_id": "3f9a1c0e7b2d4e8f9a6b5c4d3e2f1a0b",
"app_ids": [
"6a2024af837c7a06c83021c1"
]
}{
"error": {
"code": "unauthenticated",
"message": "Invalid workspace API key",
"details": {}
}
}{
"error": {
"code": "scope_required",
"message": "The key needs the apps:watch scope",
"details": {
"required_scope": "apps:watch"
}
}
}{
"error": {
"code": "session_not_found",
"message": "Socket session not found",
"details": {}
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid request",
"details": {
"errors": [
{
"type": "string_pattern_mismatch",
"loc": [
"path",
"session_id"
],
"msg": "String should match pattern '^[0-9a-f]{32}$'",
"input": "3f9a1c0e",
"ctx": {
"pattern": "^[0-9a-f]{32}$"
}
}
]
}
}
}{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded",
"details": {}
}
}Remove app from session
Stops a session watching an app. A connected browser leaves the app’s room right away and receives room.access_revoked. Removing an app the session doesn’t watch changes nothing.
Available to white-label workspaces with live builder updates turned on. Your onboarding contact turns them on for your workspace.
Session calls are limited to 600 requests a minute per workspace. Some workspaces have a different limit. Every request that counts against the limit gets X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset (Unix time in seconds) headers, and a 429 also gets Retry-After in seconds.
curl --request DELETE \
--url https://app.base44.com/api/service/socket-sessions/{session_id}/rooms/{app_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.base44.com/api/service/socket-sessions/{session_id}/rooms/{app_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.base44.com/api/service/socket-sessions/{session_id}/rooms/{app_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.base44.com/api/service/socket-sessions/{session_id}/rooms/{app_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.base44.com/api/service/socket-sessions/{session_id}/rooms/{app_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://app.base44.com/api/service/socket-sessions/{session_id}/rooms/{app_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/service/socket-sessions/{session_id}/rooms/{app_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"session_id": "3f9a1c0e7b2d4e8f9a6b5c4d3e2f1a0b",
"app_ids": [
"6a2024af837c7a06c83021c1"
]
}{
"error": {
"code": "unauthenticated",
"message": "Invalid workspace API key",
"details": {}
}
}{
"error": {
"code": "scope_required",
"message": "The key needs the apps:watch scope",
"details": {
"required_scope": "apps:watch"
}
}
}{
"error": {
"code": "session_not_found",
"message": "Socket session not found",
"details": {}
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid request",
"details": {
"errors": [
{
"type": "string_pattern_mismatch",
"loc": [
"path",
"session_id"
],
"msg": "String should match pattern '^[0-9a-f]{32}$'",
"input": "3f9a1c0e",
"ctx": {
"pattern": "^[0-9a-f]{32}$"
}
}
]
}
}
}{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded",
"details": {}
}
}Authorizations
Workspace API key, sent as Authorization: Bearer <key>.
Path Parameters
ID of the session, from session_id in Create socket session.
^[0-9a-f]{32}$ID of the app.
^[0-9a-f]{24}$Was this page helpful?