Skip to main content
POST
Create socket session

Authorizations

Authorization
string
header
required

Workspace API key, sent as Authorization: Bearer <key>. Accepted wherever api_key is, with the same permission.

Scopes

apps:watch
WorkspaceApiKeyBearerAuth
read_only
PersonalAccessTokenAuth

Headers

Idempotency-Key
string

A unique value you choose for this page open, such as a UUID. A retry with the same value and the same app_ids returns the same session_id with a new session_token, and the earlier token stops working. The value is kept for the session's lifetime.

Required string length: 1 - 128
Example:

"5d0e2a9c-6f1b-4c3e-8a7d-2b9f0c1e4a6d"

Body

application/json
app_ids
string[]
required

IDs of the apps the session can watch, up to 8. The key must be able to watch every one.

Required array length: 1 - 8 elements
Pattern: ^[0-9a-f]{24}$
Example:

Response

Session opened.

session_id
string
required

ID of the session, for changing its apps or ending it. Keep it on your server. It can't open a connection.

Example:

"3f9a1c0e7b2d4e8f9a6b5c4d3e2f1a0b"

session_token
string
required

Secret the browser connects with, as auth.session_token. Pass it to the browser and don't store it.

Example:

"b44ws_Jd8lQ2v0mX4rT9yK1pN6sB3hW7cF5gA0eZ2uL8oI4qR"

socket_url
string
required

Origin the browser connects to.

Example:

"https://ws.base44.com"

socket_path
string
required

Socket.IO path on that origin.

Example:

"/ws/socket.io/"

expires_in
integer
required

Seconds until the session and its token expire. A session is never extended.

Example:

3600