Rooms
Join and create Flow rooms, share links, and understand access and moderation.
A room is a shared space with a stable identity, members, and access rules. Game, text, and voice services use that room identity, with separate live occupancy counts for each channel.
Join a room
Open Rooms and select a room, or follow a link such as https://flow.game/r/your-room. The game checks your session and room access before connecting. Guests can enter accessible rooms.
Share a room's /r/<slug> URL to bring someone to the same space. A link to a private room does not grant membership. An unknown room name does not automatically create a room.
Membership and presence are different: being a member does not mean you are currently connected, and entering a public room does not require becoming a member first. Occupancy counts show recent connections and may take a short time to catch up after a disconnect.
Create a room
- Sign in with a full Flow account. Guests cannot create or own rooms.
- Open Rooms → Create, enter a name, and check the proposed
/r/address. - Choose Create to create and enter the room, then share its URL.
The menu creates public rooms. A room's URL name, or slug, must be unique and contain 1–32 lowercase letters, digits, underscores, or hyphens. Some route names are reserved. Creating a room can fail if its name is taken or an ownership or creation limit has been reached.
The default limits are ten owned rooms and five creations per account per hour, with an additional service-wide creation limit. Operators can configure lower or higher limits; handle the server's response instead of assuming a creation will succeed.
Visibility
The room API supports three visibility settings:
| Visibility | Public directory | Who can enter |
|---|---|---|
| Public | Listed | Anyone with a valid session who is not banned |
| Unlisted | Not listed | Anyone with the link and a valid session who is not banned |
| Private | Not listed | Members and authorized staff, subject to room restrictions |
Unlisted means hidden from the directory, not access-controlled. Use private visibility when membership must be checked. The menu's creation form does not expose every management setting; integrations can use the room API below.
Owners and moderation
The creator becomes the owner. Owners can edit or delete a regular room, transfer it to another full-account member, and assign member or moderator roles. Transfer ownership before leaving a room you own. System rooms have extra restrictions: they cannot be deleted, renamed, or made non-public.
Moderation permissions depend on both the room role and any platform staff role. Moderators cannot act against a peer or higher-ranked user. Guests cannot become moderators.
- Kick removes membership; it is not a lasting ban from a public room.
- Ban prevents entry until lifted or expired.
- Mute restricts communication; it does not itself deny room entry. A timeout is a temporary mute.
If you cannot enter, check that the URL is current, the room still exists, and your account has the required membership. A ban must be resolved with the room's moderators. Private room reads may return “Room not found” to callers without access.
Use rooms in an integration
Configure the Flow ID session handler first. In a browser app with an active session, the SDK exposes flow.rooms:
import { getFlow } from "@flow-industries/id";
const flow = getFlow();
if (!flow) throw new Error("Initialize Flow ID before loading rooms");
const listing = await flow.rooms.list({ limit: 25 });
const room = await flow.rooms.get("your-room");list() returns { rooms, nextCursor }; pass a non-null nextCursor as cursor to read the next page. Each summary includes id, slug, displayName, description, owner, visibility, isSystem, occupancy, and createdAt. get() adds viewerRole and memberCount. Public reads work without a session. Mutations need a session, and creating a room needs a full account. For example, run this from an explicit create action:
const room = await flow.rooms.create({
slug: "your-room",
displayName: "Your room",
visibility: "unlisted",
});Other methods include mine(), join(slug), leave(slug), members(slug), presence(slug), update(slug, patch), and remove(slug). join() records membership; it does not open a game connection or bypass private-room admission.
Failures throw RoomsRequestError with an HTTP status and, where supplied, a machine-readable reason. Handle 401 by restoring or signing in, 403 as an access refusal, 404 as unavailable to this viewer, 409 as a conflict, and 429 by waiting before retrying.
The corresponding HTTP routes start at /api/rooms on the configured Auth host. Room settings reads and writes require management permission even when the room is public. Always honor the server's access decisions rather than inferring permission from directory visibility or a cached role.
| Request | Result |
|---|---|
GET /api/rooms?limit=25&cursor=... | Public directory with rooms and nextCursor; omit cursor for the first page |
GET /api/rooms/:slug | A visible room's details |
POST /api/rooms/:slug/join | Join membership using the caller's bearer token |
POST /api/rooms/:slug/leave | Leave membership using the caller's bearer token |
GET /api/rooms/:slug/presence | { roomId, slug, channels }, subject to visibility rules |
Display presence
Presence contains game, voice, and text arrays. Each entry has userId, username, and joinedAt. Counts and rosters ignore heartbeats older than 90 seconds. These are channel-specific connections; summing the three counts can count the same person more than once.
To show the current game occupancy using the SDK instance above:
const presence = await flow.rooms.presence("your-room");
const output = document.querySelector("[data-room-presence]");
if (output) {
output.textContent = `${presence.channels.game.length} playing`;
}Provide an element with data-room-presence in your app, catch lookup errors, and refresh the snapshot while that UI is visible if you need a live count. This is a read of service-reported presence, not a way to report yourself as connected. Use the room API for new integrations; the historical /dialog/room-widget iframe is no longer part of the current SDK's widget routes.