Skip to content
Server

Server-to-server API

Signed moderation actions for your backend: kick, mute, ban and more.

Moderate from your backend without being in the room. This API signs each request with query parameters, and doesn't use the X-App-* headers.

GET https://stream.zavryn.online/api/v1/server?Action=<Action>&<params>

Sign a request

Add these parameters to every request:

ParameterDescription
AppIdYour App ID
SignatureNonceA random value for each request
TimestampThe current Unix time in seconds, within 600 seconds of server time
Signaturemd5(AppId + SignatureNonce + ServerSecret + Timestamp) in lowercase hex
import crypto from "node:crypto";
 
const ts = Math.floor(Date.now() / 1000);
const nonce = crypto.randomBytes(8).toString("hex");
const signature = crypto
  .createHash("md5")
  .update(`${appId}${nonce}${serverSecret}${ts}`)
  .digest("hex");
 
const url =
  "https://stream.zavryn.online/api/v1/server?Action=KickUser" +
  `&AppId=${appId}&SignatureNonce=${nonce}&Timestamp=${ts}&Signature=${signature}` +
  "&RoomId=team-meeting&UserId=user-456";
 
await fetch(url);

Response

{ "Code": 0, "Message": "success", "RequestId": "a1b2-...", "Data": {} }

Code is 0 on success. Auth failures return 401 or 403, with a message such as Invalid signature, Timestamp expired or invalid or Project is suspended. An unknown action returns 400 Unknown action.

Actions

ActionParametersDescription
KickUserRoomId, UserIdRemoves a user from a room and their seat
MuteUserRoomId, UserId, MuteAudio (0 or 1), MuteVideo (0 or 1)Force-mutes a user's tracks
BanUserUserId, optional RoomId, optional DurationSecondsBans a user. Without RoomId, the ban is project-wide.
SendCustomCommandRoomId, MessageContent, optional FromUserId, optional ToUserIds[]Sends a custom data message to a room or to specific users
DescribeUserListRoomIdLists participants: Data: { TotalCount, UserList: [{ UserId, UserName, JoinedAt }] }