Skip to main content

odin_room_join

Joins a room on an ODIN server. This function takes an URL to an ODIN gateway and a signed room token obtained externally that authorizes the client to establish the connection.

Gateways

To get started with the ODIN Voice SDK, you can use the default gateway at https://gateway.odin.4players.io. This gateway is hosted by 4Players and is available for public use. If you're interested in hosting your own gateway and servers see this document.

Depending on the region you're in, you might want to use a different gateway. See a list of available gateways here.

Declaration
OdinReturnCode odin_room_join(OdinRoomHandle room, const char *url, const char *token);

Parameters

room

Handle of the room to join. See

OdinRoomHandle

for more information.

Declaration
OdinRoomHandle room;

url

URL of the ODIN gateway to connect to. If you are unsure, use the default gateway at https://gateway.odin.4players.io.

Declaration
const char *url;

token

Token used to authenticate with the room. This token should be obtained from server side. See this document for more information on this topic. For testing purposes you can use

odin_token_generator_create

on client side to generate a token.

Security

Never expose your access key or token to the client. Always generate tokens on the server side in production environments.

Declaration
const char *token;

Returns

A return code indicating success or failure. See

OdinReturnCode

for more information.

Return Type
OdinReturnCode