Skip to main content
Version: 2.x

Connect Room

Initiates the connection to an ODIN server. This function sends the join request. Use the 'On Room Joined' event to react to a successful connection.

Inputs

NameTypeDescription
GatewaystringThe Gateway URL (e.g. 'https://gateway.odin.4players.io').
AuthenticationstringThe authentication token (JWT) or signed JSON payload. Generate this using Generate Room Token.
CryptoobjectOptional: End-to-end encryption configuration.

Outputs

NameTypeDescription
Return ValueobjectThe room object.
SuccessbooleanTrue if the connection request was sent successfully.