Messages, friends and calls
Paths are relative to https://api.vrchatlegends.com/api. Messages are in beta. Requests use a signed-in session, or an API key with the scopes listed below. Friends are two accounts that follow each other's Legend pages; only friends can start a one to one chat.
How messages are protected
- Message text, photo captions, group names and stored photos are encrypted at rest (AES-256-GCM). A copy of the data files alone does not reveal chats.
- Photos and chat backgrounds are served through signed links that expire after a few hours; a link cannot be changed to open another photo.
- Voice and video calls are end-to-end encrypted. Audio and video go directly between the people in the call (WebRTC, DTLS-SRTP). The server only passes connection messages and never has the keys. Each pair of people sees a matching safety code to rule out anyone in the middle.
- Deleted messages leave a "message deleted" note. The original is kept for 90 days in a log only staff can read, so reports can still be checked.
Friends and conversations
| Method and path | Behavior / API-key scope |
|---|---|
GET /friends | Your friends. friends:read |
GET /messages | Your one to one and group chats, newest first, with unread counts. messages:read |
GET /messages/unread | Total unread count. messages:read |
:target in the paths below is a friend's account id (one to one chat) or a group id starting with g_.
| Method and path | Behavior / API-key scope |
|---|---|
GET /messages/:target | Messages (?before=ISO pages back), read times, members, bots, background. messages:read |
POST /messages/:target | Send { "body": "text" }, up to 2000 characters. messages:write |
POST /messages/:target/image | Send a photo: multipart image (up to 10 MB) and optional body. Photos are checked for unsafe content. messages:write |
POST /messages/:target/read | Mark the chat read. messages:read |
POST /messages/:target/typing | Show "is typing" for a few seconds. messages:write |
DELETE /messages/:target/:messageId | Delete your own message (group owners can delete any in their group). messages:write |
PUT /messages/:target/background | { "kind": "preset", "id": "aurora" } or { "kind": null }. messages:write |
POST /messages/:target/background/image | Photo background (multipart image, optional dim 0-80). messages:write |
PUT /messages/:target/bubble | Your bubble colour in this chat (Bronze Legend and up) or null. messages:write |
Sending is limited to 30 messages a minute.
Group chats
| Method and path | Behavior / API-key scope |
|---|---|
POST /messages/groups | New group { "name", "members": [accountId] }. Members must be your friends. Up to 25 people. messages:write |
PATCH /messages/:groupId | Rename { "name" } (owner). messages:write |
POST /messages/:groupId/members | Add friends { "accountIds": [] } (owner). messages:write |
DELETE /messages/:groupId/members/:accountId | Remove someone (owner), or leave with your own id. messages:write |
POST /messages/:groupId/icon | Group icon, multipart image (owner). DELETE removes it. messages:write |
POST /messages/:groupId/bots | Add a bot { "botId" } (owner). See Chat bots. messages:write |
Calls
Calls work in one to one chats and groups (up to 8 people). Browsers connect to each other with WebRTC; these routes only pass connection messages along over the live connection.
| Method and path | Behavior |
|---|---|
GET /messages/calls/config | STUN and TURN servers for the browser |
GET /messages/calls/active | Calls you can join now |
POST /messages/:target/call | Start a call, or join the one running |
POST /messages/:target/call/signal | { "to", "signal" } where signal.type is offer, answer, ice or media |
POST /messages/:target/call/ping | Stay in the call (every 15 seconds) |
POST /messages/:target/call/leave | Hang up |
POST /messages/:target/call/decline | Turn down a ringing call |
Live events
Signed-in browsers receive message.new, message.sent, message.read, message.deleted, message.typing, message.conversation and message.call on the live connection (/api/live/ws, topic notify:<accountId>).