Voznest Forge

Workspace

WorkspaceProjects

Development

DocsAPI ReferenceSDKsEmbed StudioChangelog
  1. Forge
  2. /Docs

Start here

Getting StartedQuickstartPlatform ConceptsEnvironments

Build

ProjectsIdentityAgentsGatewayCapabilitiesPermissions ReferenceInstallationsLive activity

Commands & interactions

CommandsContext-menu CommandsInteractionsComponentsModals (Forms)Activities (Embedded Apps)

Acting in hubs

MessagesEmbedsEmbeds v2 (Blocks)Embeds v3Incoming WebhooksHub Management APIEvent StreamDelivery

Sign in with Voznest

AccessOpenID Connect

API

APIAuthenticationErrorsRate LimitsSecurity

Publish & operate

App Market & ListingTemplates & SandboxObservability & Team Tools

Tools

SDKsExamplesFAQ & TroubleshootingReference

Build

Gateway

The realtime connection agents use: authentication, events, presence and reconnection.

Agents receive what happens in their hubs over a Socket.IO connection to https://api.voznest.com. The token goes in the handshake; the server never trusts ids sent by the client. Every event is emitted on the event channel as { t: "TYPE", d: { … } }.

ts
import { io } from "socket.io-client";const gateway = io("https://api.voznest.com", {  auth: { token: `Bot ${process.env.VOZNEST_BOT_TOKEN}` },  transports: ["websocket"],});gateway.on("ready", ({ userId }) => console.log("connected as", userId));gateway.on("event", ({ t, d }) => {  switch (t) {    case "MESSAGE_CREATE": /* d.message, d.author */ break;    case "MEMBER_ADD":     /* d.member, d.userId   */ break;    case "INTERACTION_CREATE": /* answer it — see Interactions */ break;  }});gateway.on("connect_error", (err) => console.error(err.message)); // e.g. invalid token// Show what the agent is doing (appears on its profile and in member lists).gateway.emit("presence:activity", { type: "watching", name: "/help" });

What an agent receives

Hub events arrive for every hub the agent is a member of; channel events only for channels the agent can view (its role and channel overwrites decide). INTERACTION_CREATE goes only to the agent that handles that environment.

EventScopeMeaning
INTERACTION_CREATEYour agentA member used a command, clicked a component or submitted a form. Contains the token to answer.
COMMANDS_UPDATEHubThe command list of an app in the hub changed.
MESSAGE_CREATEChannelA message was sent: { message, author }.
MESSAGE_UPDATEChannelA message was edited, pinned, its poll or components changed.
MESSAGE_DELETEChannelA message was deleted: { id, channelId } (or a bulk delete by author).
REACTION_ADD / REACTION_REMOVEChannel{ messageId, channelId, emoji, userId }
TYPING_STARTChannelSomeone is typing (never persisted).
THREAD_CREATE / THREAD_UPDATEHubThreads and forum posts changed.
CHANNEL_CREATE / CHANNEL_UPDATE / CHANNEL_DELETEHubChannels and categories changed.
CHANNELS_REORDERHubPositions or categories changed.
ROLE_CREATE / ROLE_UPDATE / ROLE_DELETEHubRoles changed.
MEMBER_ADD / MEMBER_UPDATE / MEMBER_REMOVEHubMembers joined, changed (roles, nickname, timeout) or left.
SERVER_CREATE / SERVER_UPDATE / SERVER_DELETEAgent / hubThe agent was added to a hub; a hub's settings changed; the hub was deleted or the agent removed.
EVENT_CREATE / EVENT_UPDATE / EVENT_DELETEHubScheduled events changed.
EMOJIS_UPDATEHubCustom emoji or stickers changed.
PRESENCE_UPDATEHubA member's status or activity changed.
VOICE_STATE_UPDATEHubVoice participants, mute, camera, auditorium state changed.
USER_JOINED_VOICE / USER_LEFT_VOICEHubSomeone joined or left a voice channel.
GAME_UPDATEChannelA mini-game in chat changed (board, turn, winner).
HUB_DOCS_UPDATEHubA wiki page was created, edited or deleted.
BOARD_UPDATE / BOARD_DELETEHubA kanban board changed.
JOIN_REQUEST_UPDATEHubAn application to join a private hub was filed or reviewed.
APPEAL_UPDATEHubA ban/suspension appeal was filed or decided.

Presence

EmitPayload
presence:status{ status: "online" | "idle" | "dnd" | "invisible" }
presence:activity{ type: "playing" | "listening" | "watching" | "streaming" | "competing" | "custom", name, details?, state? } | null

Connection rules

  • Payloads are limited to 64 KB; ping every 20 s. A dropped connection that comes back within 60 s resumes and receives what it missed.
  • Developer-portal (browser) sessions can't open the gateway — only agent tokens and the Voznest apps.
  • Rotating or revoking an agent token disconnects its live sessions immediately.
  • A connection refused during platform maintenance gets MAINTENANCE in connect_error; retry with backoff.
Need events on a server without keeping a socket open? Use the signed Event Stream to your HTTPS endpoint instead.
PreviousAgentsNext Capabilities