Getting Started
Rooms is built on ODIN Voice and can be extended with your own tools - e.g. bots for recording, transcription/AI, custom UIs, or external automations. Rooms uses ODIN access tokens. Tokens are created from an access key that is private to your Rooms project.
This minimal guide shows how to:
- Create a Rooms-compatible ODIN token via our hosted token service, and
- Join a Rooms room with the ODIN Web SDK.
Prerequisites
- A Rooms instance (free option available): https://www.rooms.chat/pricing/
- Your Rooms Project API Key (
apiKey) for token creation (keep this private / server-side). - Your Rooms Project Secret (
secret) for token creation (keep this private / server-side).
To get your Rooms instance, order a free instance here: https://www.rooms.chat/pricing/. After that, navigate to
https://app.netplay-config.4players.de/rooms and select your instance from the list. Then copy the apiKey and secret
from the settings page.
The secret is used to sign the token, so it must be kept private. If you don't trust your secret anymore, for example because you leaked it accidentally in a public repository, you can create a new secret and invalidate all existing tokens in our dashboard.
1) Create an ODIN token for a Rooms room (server-side)
Rooms provides a hosted service that returns everything your client/bot needs:
token(JWT)domain(your Rooms domain)
Request
POST https://secure.4players.de/public/api/v1/projects/${apiKey}/create-token
Payload:
Response:
This is a tiny Node.js endpoint example that you can host anywhere (i.e. as a Lambda function in AWS or on your own
server). It uses the fetch API to call the Rooms token endpoint with your apiKey.
For testing purposes you can directly call our token service, but do not call the token endpoint directly from the browser in production, otherwise your apiKey becomes public. Rooms api keys must not be embedded in client-side code in production. Our token server has a rate limit of 100 requests per minute.
2) Join the room with ODIN Web SDK (client-side)
This is the smallest practical flow:
- Initialize the web audio plugin
- Fetch token data from your backend
- Hoin the room (with E2EE cipher)
- Start audio output + microphone
Minimal example (ESM / TypeScript-style)
You can find more examples in the ODIN Web SDK documentation: https://docs.4players.io/odin/web/
Rooms displays a list of all peers in the room. Every peer in a room has an avatar icon and a name. The mute state is
also displayed in the rooms peer list. To make sure that every bot, script or agent in the room looks good, a peer
object of a specific structure must be set for each participant. This is done in the roomsPeerData variable in the
example above.
It's important to understand to use the same gateway for all participants in the room. The gateway is used to establish a secure connection between the client and the Rooms server. There are three parts that need to match for each user that should be connected to the same room:
- Rooms project API key
- Room ID
- Gateway
Rooms peer data (why it matters)
Rooms uses a JSON “peer data” object to correctly display participants (name, avatar, mute/output state, etc.). When building bots/scripts/apps that join Rooms, you should send this user data so your peer appears correctly in the Rooms UI.
The Rooms peer data object is a JSON string that has this format (ZOD definition):
You can extend the object for your own needs. However, Rooms may update/override certain fields when settings change in the Rooms UI (this behavior may vary and should be tested).
If anything behaves unexpectedly, please reach out on Discord (or email support): https://docs.4players.io/rooms/ 
Avatar Service
The most important fields are userId, name and avatar. avataris a URL to an image that will be displayed in the
Rooms UI. For testing purposes you can use our avatar service to generate a random avatar for your users:
https://app-server.odin.4players.io/v1/avatar/{seed}/initials
The seed is the initials followed by a - and a random number encoding a color.
Room and User IDs
The userId field is used to identify the user in the Rooms UI. It must be unique for each participant in the room. The
roomId is used to identify the room. It can be any string, but it must be the same for all participants in the room.
For more advanced features (events, device selection, React/Angular examples), continue here: https://docs.4players.io/voice/web/ 
Sample project
ODIN Communicator shows a complete ODIN Web SDK implementation for this flow: https://github.com/4Players/odin-communicator (currently private; will be published later)