Embedding Configuration

Defines how to configure the embedded chat interface using GET parameters at load time and postMessage for dynamic, session-based updates.

GET Parameters Overview

The GET parameters for our chat application consist of both obligatory and optional parameters. These parameters allow for customisation of the chat interface, user identification, room identification, language selection, interface mode, and more. For specific functions such as audio streaming, there are additional parameters available.

Required Parameters

These parameters are required for the chatroom to function properly:

ParameterTypeRequiredDescription
userIdstringYesA unique identifier for the user in the partner's app. This can be an encrypted ID. The ID must be no longer than 255 characters, and can consist of Latin, Cyrillic, or special characters. No restrictions are set on the character types that can be used.
roomidstringYesA unique identifier for the chatroom in the partner's app. This ID must be no longer than 255 characters, and can consist of Latin, Cyrillic, or special characters. No restrictions are set on the character types that can be used.
apikeystringYesAPI key which you can obtain from Watchers manager

Optional GET Parameters

Parameter

Type

Required

Enabled by Admin Panel

Description

lang

string

No

No

An optional language setting for the interface. This parameter can be used to set a default language for the chat interface. Supported languages adhere to ISO 639-1 language codes. More on ISO Language Codes. Supported languages (40): English (en), Russian (ru), Armenian (hy), Serbian (sr), German (de), Spanish (es), Arabic (ar), Romanian (ro), Turkish (tr), Hindi (hi), Portuguese (pt), Portuguese — Brazil (pt-BR), Chinese (zh), Malay (ms), Bengali (bn), Thai (th), French (fr), Finnish (fi), Icelandic (is), Korean (ko), Polish (pl), Azerbaijani (az), Uzbek (uz), Ukrainian (uk), Japanese (ja), Dutch (nl), Georgian (ka), Bulgarian (bg), Croatian (hr), Greek (el), Italian (it), Turkmen (tk), Swahili (sw), Indonesian (id), Vietnamese (vi), Filipino (fil), Zulu (zu), Tswana (tn), Afrikaans (af), Xhosa (xh)

autotranslate

boolean

No

No

When set to true, this parameter enables automatic translation of all incoming messages during the session. The translation language is determined by the lang parameter (if provided), or defaults to the project language. If the user has disabled autotranslation in their personal settings, this parameter is ignored. If autotranslation is already enabled in the user's settings, this parameter has no effect. User settings remain unchanged — the behavior is session-scoped only.
Read more...

title

string

No

No

An optional title for the chat room, displayed in the admin panel for easier navigation by moderators. Limited to 255 characters, with no restrictions on character types (Latin, Cyrillic, or special characters).

mode

string

No

No

An optional interface mode setting. Options include "dark" for dark mode and "light" for light mode. This parameter sets a default mode for the chat interface, with the ability for users to change it if enabled.

readonly

boolean

No

No

When set to true, this optional mode disables all interface controls except the arrow button for navigating to the latest messages. Users can only read messages without interacting with the chat. Useful for public broadcasts, archiving, and moderation. If readonly is true, you can provide userid=0 or use an iframe without the userid GET parameter. Read more...

authcode

string

No

Yes

Must be provided if OAUTH authorisation is enabled.

imageId

string

No

Yes

Read more...

image

string

No

Yes

Read more...

nickname

string

No

Yes

Read more...

os

string

No

Yes

See additional information below.

osVersion

string

No

Yes

See additional information below.

oddsformat

string

No

Yes

Allows choosing how odds are displayed: decimal (default) or american. Read full documentation →

extuserid

string

No

No

An alternative external user ID. Acts as a fallback for userid: if userid is not provided, extuserid is used instead. Useful when different external systems use different user identifiers.

platform

string

No

No

Platform identifier (e.g. web, ios, android). Used for analytics tracking and to adjust video player behavior per platform. Defaults to web if not provided.

appversion

string

No

No

Application version string. Used alongside os, osVersion, and platform for device detection and analytics.

profileurl

string

No

Yes

URL to the user's profile on the partner platform. Applied during registration if the profile linking feature is enabled and linking type is set to GET in the admin panel.

total

number

No

Yes

Wager wall threshold amount. Used together with current and currency. When current < total and readonly=true, the chat input is blocked and a wager progress bar is displayed. Read more...

current

number

No

Yes

Wager wall current progress amount. Must be provided together with total. Represents how much the user has wagered so far. Read more...

currency

string

No

Yes

Currency symbol or code displayed on the wager wall progress bar (e.g. USD, EUR, ). Used together with total and current. Read more...

eventdate

string

No

No

Event date associated with the room. Displayed in the room header area. Can be used together with sporttypetitle to provide event context.

sporttypetitle

string

No

No

Sport type label for the room (e.g. Football, Basketball). Displayed alongside eventdate in the room header.

bg

string

No

No

Background color applied to the chat container before the interface loads. Accepts a 6-digit hex value without # (e.g. FF0000) or a CSS color name. Useful to match the chat background with the host page while the widget is loading.

By adhering to these integration protocols, partners can efficiently incorporate existing user properties into our platform via GET parameters, facilitating a user experience that is both personalised and coherent.

Runtime Configuration via postMessage

In addition to GET parameters used during iframe initialisation, the embedded chat supports runtime updates via the browser’s postMessage API. This enables dynamic changes to interface settings such as theme, language, and odds format — without reloading the chat or losing current session state.

Supported message types

Each message must be sent from the parent window to the iframe and follow this JSON structure:

{
  "type": "<setting>",
  "body": {
    "data": "<value>"
  }
}
typebody.data valuesDescription
modelight or darkUpdates the interface theme
langISO 639-1 code (e.g. en)Changes the language of the chat interface
oddsFormatdecimal or americanAdjusts the odds display format

Behavior

  • These updates are session-scoped and take effect immediately without reloading the iframe.
  • The chat preserves input state, message history, and scroll position.
  • On full page reload, settings revert to values passed via the GET parameters.

Example

iframeEl.contentWindow.postMessage({
  type: 'mode',
  body: { data: 'dark' }
}, '*');

Security note: Always validate event.origin on the receiving end to ensure messages are from trusted sources.

Example Listener in Parent Window

To handle dynamic configuration updates, implement a listener for message events in the parent window:

window.addEventListener("message", (event) => {
  const { type, body } = event.data || {};
  if (!type || !body?.data) return;

  switch (type) {
    case "mode":
      console.log("Theme changed to:", body.data);
      // Update UI theme or store the preference
      break;
    case "lang":
      console.log("Language changed to:", body.data);
      // Update UI language or trigger i18n update
      break;
    case "oddsFormat":
      console.log("Odds format changed to:", body.data);
      // Update display logic for odds formatting
      break;
    default:
      // Ignore unknown message types
      break;
  }
});

This listener enables the parent application to react to configuration changes if needed. For simple iframe communication, it is not required — the embedded chat handles updates internally.