Chat bots
Chat bots (beta) work a bit like Discord bots. You make them at Developers → Chat bots; group owners add them to their group chats, and people can mention them in comments.
Getting started
- Create a bot. Save its token and signing secret; they are shown once.
- Give it an avatar, a tag (shown next to its name, like
BOTorMUSIC) and slash commands. - Turn on the intents it needs (below).
- A group owner adds it in Group settings → Bots: your own bots are listed there, and public bots can be added by ID.
- Read events from the event feed (no server needed) or a webhook, and reply with the Bot API.
- Optionally fill in its listing page and list it in the bot directory so anyone can add it.
Bots only join group chats, never one to one chats. They only see messages sent after they were added, and everyone in the group sees that a bot is there.
Authentication
Send the token with every request:
Authorization: Bot vrclbot_<botId>.<secret>
Rotate token gives a new token and keeps the old one working for 24 hours, so a running bot can switch over without going offline. Reset now ends every old token at once; use it if a token leaks.
Intents
| Intent | What it allows |
|---|---|
| Message content (privileged) | Read the text of every message in its chats. Without it, a bot only gets messages that mention it (@Name or @bot_id) or start with one of its commands; other messages arrive with an empty body. |
| Members | See the names of the people in its chats, and who joined or left. Without it, only their ids and the member count. |
| Comments | Answer when mentioned in comments on Legend pages and posts. |
Endpoints
Base URL https://api.vrchatlegends.com/api/bots.
| Method and path | Behavior |
|---|---|
GET /v1/me | The bot's profile |
GET /v1/events?after=<cursor>&wait=25 | The event feed: events after a cursor, waiting up to 25 seconds for one |
GET /v1/chats | Group chats the bot is in, and DMs ("kind": "dm", id dm_<account id>) |
GET /v1/chats/:chatId | One chat: name, member count, members (members intent, or in a DM), the bots in it, and any running call |
GET /v1/chats/:chatId/messages?after=ISO | Messages since the bot joined, oldest first (up to 100) |
GET /v1/chats/:chatId/messages?before=ISO | Page back: the newest messages older than that time (up to 100) |
GET /v1/chats/:chatId/messages/:messageId | One message |
POST /v1/chats/:chatId/messages | Send { "body", "embeds"?, "components"?, "replyTo"? } |
PATCH /v1/chats/:chatId/messages/:messageId | Edit one of the bot's own messages (any of body, embeds, components) |
POST /v1/chats/:chatId/messages/:messageId/reactions | React { "emoji": "👍", "on": true } (on: false takes it back) |
DELETE /v1/chats/:chatId/messages/:messageId | Delete one of the bot's own messages |
POST /v1/chats/:chatId/typing | Show "is typing" for a few seconds |
POST /v1/chats/:chatId/leave | Leave a chat |
PUT /v1/commands | Set slash commands { "commands": [{ "name", "description", "options"? }] } (up to 25). See Command options |
PUT /v1/status | The line under the bot's name { "text": "Playing lofi", "minutes"?: 30 }. minutes clears it on its own; { "text": "" } clears it now |
POST /v1/chats/:chatId/scheduled | Send later { "sendAt": "2026-12-05T18:00:00Z", "body", "embeds"?, "components"?, "replyTo"? } |
GET /v1/scheduled?chatId= | Scheduled messages still waiting |
DELETE /v1/scheduled/:id | Cancel a scheduled message |
GET /v1/storage?prefix= | The bot's stored keys, with sizes |
GET /v1/storage/:key | One stored value |
PUT /v1/storage/:key | Store { "value": <any JSON> } |
DELETE /v1/storage/:key | Delete a stored value |
POST /v1/comments/reply | Reply to a comment that mentioned the bot { "pageId", "postId"?, "commentId", "body" } |
GET /v1/calls/config | STUN and TURN servers for calls |
POST /v1/chats/:chatId/call/join | Join the group's voice call (starts one if none is running) |
POST /v1/chats/:chatId/call/signal | Send { "to", "signal" }: a WebRTC offer, answer, ice or media message |
POST /v1/chats/:chatId/call/ping | Stay in the call (every 15 seconds) |
POST /v1/chats/:chatId/call/leave | Hang up |
GET /avatars/:botId.webp | A bot's avatar (public) |
GET /directory | Listed bots (public) |
GET /profiles/:botId | A public bot's listing page data (public) |
Command options
Commands can take options, like Discord. People see them as a hint while they type, and your bot gets them already parsed.
{ "commands": [
{ "name": "roll", "description": "Roll dice", "options": [
{ "name": "sides", "description": "Sides on each die", "type": "integer", "required": true, "min": 2, "max": 100 },
{ "name": "count", "description": "How many dice", "type": "integer" }
] },
{ "name": "flavor", "description": "Pick a milk", "options": [
{ "name": "kind", "type": "string", "required": true, "choices": [{ "name": "Chocolate", "value": "choc" }, { "name": "Strawberry", "value": "straw" }] }
] }
] }
typeisstring,integer,number,booleanoruser. Up to 10 options, required ones first, up to 25choiceseach.- People type options in order (
/roll 20 2) or by name (/roll count:2 sides:20). "Quotes" keep words together, and the last text option takes the rest of the line. - The
message.createdevent for a command carriesmessage.command:
{ "name": "roll", "args": "20 2", "options": { "sides": 20, "count": 2 }, "errors": [] }
errors lists anything missing or wrong ("sides is required.") so the bot can answer with how to use the command.
Storage
Each bot gets a small key-value store, so it can remember things (scores, settings, who it welcomed) without running a database. Keys are 1 to 64 letters, numbers or . _ : -. A value is any JSON up to 16 KB, with up to 200 keys and 1 MB per bot. Storage is private to the bot and is deleted with it. Use prefixes like score:dm_123 and list them with ?prefix=score:.
Scheduled messages
POST /v1/chats/:chatId/scheduled sends a message at sendAt, 10 seconds to 30 days ahead, even if the bot is offline then. Good for reminders and event announcements. Up to 100 can wait per bot. The message is checked when you schedule it; if it still cannot be sent when the time comes (the bot was removed from the chat, say), the bot gets a schedule.failed event with the error.
DMs
Anyone can message a public bot one to one from its card or listing page; a private bot only talks to its owner. A DM's chat id is dm_<account id>. In a DM the bot reads every message, with no intent needed. Bots can only reply in DMs people started, and someone who blocks the bot (or its owner) stops getting its messages. DMs have no voice calls and cannot be left.
Embeds and buttons
Messages can carry up to 4 embeds and up to 3 rows of 5 buttons, like Discord. A message needs a body or at least one embed.
{
"body": "",
"embeds": [{
"title": "Server status",
"url": "https://example.com/status",
"description": "Everything is **running**.",
"color": "#22c55e",
"author": { "name": "Status bot" },
"fields": [{ "name": "Players", "value": "12", "inline": true }, { "name": "Region", "value": "EU", "inline": true }],
"image": { "url": "https://example.com/graph.png" },
"thumbnail": { "url": "https://example.com/logo.png" },
"footer": { "text": "Updated every minute" }
}],
"components": [[
{ "label": "Refresh", "style": "primary", "customId": "refresh", "emoji": "🔄" },
{ "label": "Website", "style": "link", "url": "https://example.com" }
]]
}
Button styles: primary, secondary, success, danger, and link (opens url). Pressing any other button sends the bot an interaction.button event with customId, the chat, the message and the person who pressed it. Answer by sending a message, or by editing the one with the button (for example to turn it off with "disabled": true). Embed pictures are fetched and checked by our server and shown from there, so viewers never load them from your site.
Other events: message.edited when someone edits a message the bot could read, and message.reaction.added / message.reaction.removed for reactions to the bot's own messages. Messages the bot reads include replyTo, forwarded and hasVoice.
Event feed
The simplest way to run a bot: ask for new events and wait for the next one (long polling). No server or public address is needed.
let cursor = (await api('/v1/events?from=now')).cursor
for (;;) {
const { events, cursor: next } = await api(`/v1/events?after=${cursor}&wait=25`)
cursor = next
for (const e of events) handle(e)
}
?from=now skips events from before the bot started. The feed keeps the last 500 events per bot. It gets every event a webhook would, plus call connection messages.
Voice calls
Bots can join group voice calls to play audio and share a camera or screen. Calls are end-to-end encrypted, so a bot connects straight to each person with WebRTC, like a browser (in Node, the @roamhq/wrtc package works).
POST /v1/chats/:chatId/call/join. The reply lists the people already in the call (others) and the ICE servers.- Make one
RTCPeerConnectionper person, add your audio (and video) tracks, and send each of them an offer withcall/signal. People who join later send you an offer. - Their answers and ICE candidates arrive as
call.signalevents. Use "perfect negotiation": if both sides offer at once, the side with the smaller id (compared as text) gives way. - Send
{ "type": "media", "camera": "<stream id>", "screen": "<stream id>", "muted": false }so people see which video is your camera and which is your screen. - Ping every 15 seconds and
call/leavewhen done.call.leftandcall.endedevents tell you when people go.
Listing page
Fill in the Listing page tab in the portal: a longer description (Markdown), features, website and support links, tags and a banner colour. Public bots get a page at /chat-bots/<botId> with an Add to group button, and you can list them in the directory.
Comments
When someone mentions a bot in a comment, the bot gets a comment.mention event and can post up to 3 replies under that comment within 15 minutes. It cannot post anywhere it was not mentioned. Private bots only work on their owner's own page.
Page owners can block single bots or all bots from their page and posts in Account settings → Bots. Anyone who blocks a person also stops that person's bots from answering them and from showing them messages.
Webhooks
Set an HTTPS webhook URL to receive events. Each request carries:
X-VRCL-Event: the event typeX-VRCL-Timestamp: Unix secondsX-VRCL-Signature:v1=+ HMAC-SHA256 of<timestamp>.<raw body>using your signing secret
Answer with a 2xx status within 6 seconds. After 20 failed deliveries in a row the webhook is turned off; turn it back on in the portal.
| Event | Sent when |
|---|---|
message.created | Someone writes in a group the bot is in (filtered by the message content intent) |
schedule.failed | A scheduled message could not be sent when its time came (error says why) |
bot.added / bot.removed | The bot joins or leaves a group |
comment.mention | Someone mentions the bot in a comment (comments intent) |
member.joined / member.left | People are added to or leave a group the bot is in (names with the members intent) |
call.started | Someone starts a voice call in a group the bot is in |
call.signal, call.joined, call.left, call.ended | While the bot is in a call (event feed only, except call.ended) |
ping | You press "Send test event" |
{
"id": "…",
"type": "message.created",
"createdAt": "2026-11-13T12:00:00.000Z",
"botId": "bot_…",
"data": {
"chat": { "id": "g_…", "name": "Game night" },
"author": { "id": "…", "name": "Sketch494", "bot": false },
"message": { "id": "…", "body": "/roll", "createdAt": "…", "hasImage": false }
}
}
Limits
| Limit | Value |
|---|---|
| Requests | 60 every 10 seconds (the event feed and calls: 400 every 10 seconds) |
| Messages per chat | 10 every 10 seconds |
| Messages in total | 30 a minute |
| Comment replies | 6 a minute, 3 per mention |
| Repeated text | The same text at most 3 times a minute |
| Bots per account | 5 |
Going over a limit answers HTTP 429.