Skip to content
Fluxer API

Voice

Fluxer runs voice over LiveKit. The Gateway places a session in a voice channel and sends it a grant, which the client uses to connect to a LiveKit media server.

SurfaceDescriptionReference
Guild voice channelA channel of type 2Channels
Private callThe voice channel of a DM or group DMCalls
StreamA screen share published on an existing connectionStreams
Entrance soundA clip played for everyone in a voice channel when you joinEntrance sounds
Voice activity sharingWhether friends see which voice channel you are inUser settings

No HTTP route returns media or the grant. A client sends Voice State Update and gets a Voice Server Update. The client connects to its endpoint with its token, using the LiveKit protocol. The grant also has an e2ee_key when the channel is end-to-end encrypted.

A peer-to-peer grant has ICE servers and no endpoint or token.

LiveKit room and participant names use these formats.

NameFormat
Guild voice channel roomguild_{guild_id}_channel_{channel_id}
Private call roomdm_channel_{channel_id}
Participant identityuser_{user_id}_{connection_id}

The grant is valid for 600 seconds. It lets the connection publish the microphone with SPEAK, and the camera and screen share with STREAM. A connection a moderator has deafened can't publish or subscribe.

If features.voice_enabled is false in the instance features, joining voice fails with VOICE_TOKEN_FAILED.

The channel_id and connection_id you send in Voice State Update decide what happens. For a private call, send a null guild_id.

What you sendResult
channel_id and no connection_idOpens a new connection
channel_id and a connection_idUpdates or moves that connection
Null channel_id and a connection_idDrops that connection
Null channel_id and no connection_id, in a guildRefused with VOICE_MISSING_CONNECTION_ID
Null channel_id and no connection_id, in a callDrops every voice connection of the session

The server sends Voice State Update to every session that can view the channel. It sends a new grant only when a connection opens, moves or changes region. Changing self_mute, self_video or self_stream sends no grant.

A voice channel has bitrate, user_limit, voice_connection_limit, rtc_region and rtc_p2p on the channel object. The default bitrate is 64000 and the maximum is 96000. The AUDIO_BITRATE_128_KBPS, AUDIO_BITRATE_256_KBPS and AUDIO_BITRATE_384_KBPS guild features raise the maximum to 128000, 256000 and 384000. Calls run at 64000.

PermissionEffect on voice
VIEW_CHANNEL and CONNECTBoth are needed to connect, or the join fails with VOICE_PERMISSION_DENIED
SPEAKPublish audio, and without it the member joins with suppress true
STREAMPublish camera video and streams
MUTE_MEMBERSApply a moderator mute with the mute member field
DEAFEN_MEMBERSApply a moderator deafen with the deaf member field
MOVE_MEMBERSMove a member to another voice channel or disconnect them
UPDATE_RTC_REGIONChange the channel's rtc_region

Modify guild member and Modify current guild member apply mute, deafen, move and disconnect to every connection the member has in the channel. When a role or overwrite change removes SPEAK or STREAM, the media server mutes the affected tracks without a new grant.

ConditionCode
The channel has user_limit members (0 is no limit, and 25 is the limit while anyone has a camera on)VOICE_CHANNEL_FULL
The member has voice_connection_limit connections in the channel (5 by default, 100 at most, 5 in a private call)VOICE_CONNECTION_LIMIT_REACHED
25 members already have a camera onVOICE_CAMERA_USER_LIMIT
The member has an active timeoutVOICE_MEMBER_TIMED_OUT
An unclaimed account joins a one-on-one call or a voice channel in a guild it doesn't ownVOICE_UNCLAIMED_ACCOUNT
Voice encryption is on, everyone in the channel is e2ee_capable, and the session (not a bot) didn't identify with itVOICE_E2EE_REQUIRED

A refused join sends no Voice Server Update. The client gets a Gateway Error only for VOICE_CHANNEL_FULL, VOICE_P2P_CONSENT_REQUIRED and VOICE_P2P_UNAVAILABLE, and gets nothing back for the other refusals on this page.

List RTC regions returns the regions the caller can pick for a channel, and the list can be empty. Modify channel sets rtc_region, which needs UPDATE_RTC_REGION, and a null region lets Fluxer pick one. Instance admins manage regions and voice servers through the Admin voice resource, and run more servers with Add voice servers.

A private call has no moderators, permission overwrites or moderator actions. The Calls resource rings recipients and changes the region, and Call Create, Call Update and Call Delete send the call state. Joining and leaving use Voice State Update.

A recipient's incoming call flags decide whether the call rings for them. Ring call recipients skips recipients the flags exclude and still returns 204.

A stream publishes screen share tracks on the connection the member already has, with no new connection or grant. The client sets self_stream on that connection with Voice State Update. A connection without STREAM always has self_stream and self_video false.

A viewer lists the streams it watches in viewer_stream_keys in its Voice State Update, and moving to another channel clears the list. The stream key ends in the publisher's connection_id. The Streams resource sets a stream's region and uploads and returns preview images.

An account uploads entrance sounds and assigns one to each scope, and the client picks which one to play. Play entrance sound needs a voice state in the channel and sends ENTRANCE_SOUND_PLAY to every other account in it. Each of those accounts gets it on every session, so a client checks channel_id before playing it.

Modify voice activity sharing sets the default and changes every existing friendship to match. The values show as share_voice_activity and friend_shares_voice_activity on the relationship object. The setting doesn't hide voice state, and every session that can view the channel still gets the voice state.