Skip to content

Object Reference

In this section, you will find a reference of common objects used within the Webfuse API.

Information related to the current Session.

interface SessionInfo {
sessionId: string;
opentokSessionId: string;
space: Space;
metadata: Record<string, any>;
}

sessionId

  • Unique identifier for the session.

opentokSessionId

  • The OpenTok session ID used for real-time media.

space

  • A Space object containing configuration and details about the Space this session belongs to.

metadata

  • Custom metadata associated with the session.
{
"sessionId": "<session_id>",
"opentokSessionId": "<opentok_session_id>",
"space": {
"access_control": "public",
"company_id": 1,
"domain": "<space_domain>",
"host_rights": "everyone",
"id": 1,
"identification": "anonymous",
"is_paused": false,
"link": "<space_url>",
"name": "test",
"slug": "test",
"type": "meeting",
"visibility": "members-only",
"adminIds": [9, 1],
"memberIds": []
},
"metadata": {
"foo": "bar"
}
}

Represents a Webfuse Space configuration.

interface Space {
access_control: string;
company_id: number;
domain: string;
host_rights: string;
id: number;
identification: string;
is_paused: boolean;
link: string;
name: string;
slug: string;
type: string;
visibility: string;
adminIds: number[];
memberIds: number[];
}

id

  • The unique identifier for the Space.

name

  • The name of the Space.

slug

  • The URL-friendly identifier for the Space.

link

  • The full URL to the Space.

company_id

  • The ID of the company that owns the Space.

type

  • The type of Space ('meeting', 'assisted', 'solo').

domain

  • The domain associated with the Space.

access_control

  • The access control setting for the Space ('members-only', 'company', 'public').

host_rights

  • Who has host rights in the Space ('everyone', 'members-only', 'admins-only').

identification

  • The identification requirement for the Space ('anonymous', 'name_only', 'verified').

is_paused

  • true if the Space is currently paused.

visibility

  • The visibility setting for the Space ('members-only', 'company').

adminIds

  • An array of user IDs who are admins of the Space.

memberIds

  • An array of user IDs who are members of the Space.

Represents an opened tab in the Session.

interface Tab {
active: boolean;
control_index: number;
isMediaSharing: boolean;
leader_index: number;
mediaSharingType: 'screen' | 'video' | null;
newTab: boolean;
paused: boolean;
sessionId: string;
ssid: number;
title: string;
url: string;
}

ssid

  • Unique identifier for the tab (Session Stream ID).

url

  • The current URL loaded in the tab.

title

  • The title of the page loaded in the tab.

active

  • true if this is the currently active (visible) tab.

paused

  • true if the streaming of this tab is currently paused.

leader_index

  • The client_index of the participant who owns/created this tab.

control_index

  • The client_index of the participant who currently has control of this tab.

isMediaSharing

  • true if this tab is being used for screen or video sharing.

mediaSharingType

  • The type of media being shared ('screen', 'video', or null).

newTab

  • true if this is a “New Tab” page.

sessionId

  • The ID of the session this tab belongs to.
{
"active": true,
"control_index": 0,
"isMediaSharing": false,
"leader_index": 0,
"mediaSharingType": null,
"newTab": false,
"paused": false,
"sessionId": "sess_12345",
"ssid": 1,
"title": "Example Domain",
"url": "https://example.com"
}

Represents a participant in the Session.

interface Participant {
name: string;
email: string;
online: boolean;
client_index: number;
self: boolean;
}

name

  • The display name of the participant.

email

  • The email address of the participant (if available).

client_index

  • A unique numeric index assigned to the participant in the session.

online

  • true if the participant is currently connected.

self

  • true if this object represents the current user.
{
"name": "John Doe",
"email": "john@example.com",
"online": true,
"client_index": 0,
"self": true
}

Settings used when initializing a Space via the Widget API.

interface IntegrationSettings {
session_start_confirmation?: boolean;
support_button_position?: string;
hidden_support_button?: boolean;
block_until_agent_joins?: boolean;
hide_until_agent_joins?: boolean;
key_combo_to_start?: boolean;
shake_to_start?: boolean;
session_autorestore_enabled?: boolean;
metadata?: Record<string, string | number | boolean>;
}

session_start_confirmation

  • Ask users for their consent before starting a Session using JS API.

support_button_position

  • Position of the support button on the page.

hidden_support_button

  • Do not show the default support button. This option is used in combination with shake_to_start or key_combo_to_start.

block_until_agent_joins

  • When a Session is started using JS API, show the Session URL and PIN until another participant joins. (Note: this option does not affect permanent Spaces.)

hide_until_agent_joins

  • When a Session is started using JS API, hide the Session interface until another participant joins. (Note: this option does not affect permanent Spaces.)

key_combo_to_start

  • Allow users to start a Session on pages with the support button by pressing Ctrl+Enter.

shake_to_start

  • Allow users to start a Session on pages with the support button, by shaking their mobile device.

session_autorestore_enabled

  • Automatically try to restore sessions started with JS API when the page is reloaded.

metadata

  • Object with key-value pairs that will be saved and then available in the Session information.

Information about a frame within a tab.

interface Frame {
frameId: number;
parentFrameId: number;
url: string;
}

frameId

  • The unique identifier for the frame. 0 represents the main frame.

parentFrameId

  • The identifier of the parent frame. -1 if the frame has no parent.

url

  • The URL currently loaded in the frame.
[
{
frameId: 123,
parentFrameId: 0,
url: "https://example.com/iframe.html"
}
]