RadioSocial | Developers
Bots can post in text channels, transmit on frequency with a synthesised voice, publish ATIS, run scripted traffic in scenario rooms and answer slash commands. The Bot API is free with rate limits. Base URL: https://radiosocial.apps.johnseong.com.
1. Create a bot
In the app, open Settings, Developer, New Bot (adults only). Copy the token once; it is shown only at creation and can be regenerated. Or call POST /v1/bots with your user session. Keep the token secret: anyone with it controls your bot.
2. Add it to a room
A room owner adds the bot from the room's settings and chooses its scopes. A bot sees and does only what its scopes in that room allow.
| Scope | Allows |
|---|---|
read_messages | Receive text messages in the room's channels. |
send_messages | Post text messages. |
transmit | Transmit synthesised speech on a frequency. Listeners render it with on-device TTS through the radio audio chain, labelled BOT. |
atis | Publish the ATIS text and letter for a frequency; listeners hear it on a loop. |
traffic | Spawn and command AI aircraft. Scenario rooms only. |
squawk | Assign transponder codes. |
strips | Read and annotate flight strips. |
commands | Register slash commands and receive interaction events. |
3. Authenticate
Send the token on every REST call:
Authorization: Bot <token>
4. Gateway events
Open a WebSocket to wss://radiosocial.apps.johnseong.com/v1/gateway. The first frame identifies the bot; the server answers with ready. Send {"op":"ping"} every 15 seconds.
// Node 22+ (built-in WebSocket)
const ws = new WebSocket("wss://radiosocial.apps.johnseong.com/v1/gateway");
ws.onopen = () => ws.send(JSON.stringify({ op: "hello", d: { token: process.env.RS_BOT_TOKEN, client: "bot", version: "1" } }));
ws.onmessage = (e) => {
if (typeof e.data !== "string") return; // binary frames are audio; bots don't receive them
const { op, d } = JSON.parse(e.data);
if (op === "chat" && d.text === "!metar") {
fetch(`https://radiosocial.apps.johnseong.com/v1/bot/rooms/${d.roomId}/messages`, {
method: "POST",
headers: { Authorization: `Bot ${process.env.RS_BOT_TOKEN}`, "Content-Type": "application/json" },
body: JSON.stringify({ channel: d.channel, text: "Try the ATIS on the room's ATIS frequency." }),
});
}
};
setInterval(() => ws.readyState === 1 && ws.send('{"op":"ping"}'), 15000);Events a bot can receive, depending on scopes: room (snapshot), member (joins and leaves), chat (messages), rx_start / rx_end (transmission metadata: frequency, callsign, role, never audio), tick (aircraft states, 1 per second), fpl (flight plan filed), strips, alert and interaction (slash commands).
5. REST actions
| Method | Path | Body (scope) |
|---|---|---|
| POST | /v1/bot/rooms/:id/messages | { channel, text } (send_messages) |
| POST | /v1/bot/rooms/:id/transmit | { freq, text } (transmit); freq in kHz, e.g. 118700 |
| PUT | /v1/bot/rooms/:id/atis | { freq, text, letter } (atis) |
| POST | /v1/bot/rooms/:id/aircraft | { cs, type, lat, lon, alt, hdg, spd } (traffic) |
| PATCH | /v1/bot/rooms/:id/aircraft/:acId | AircraftCommand, e.g. { hdg: 280, alt: 5000, spd: 210 } (traffic) |
| POST | /v1/bot/rooms/:id/commands | [{ name, description }] (commands) |
# Python 3.10+
import os, requests
API = "https://radiosocial.apps.johnseong.com"
H = {"Authorization": f"Bot {os.environ['RS_BOT_TOKEN']}"}
room = "ROOM_ID"
requests.put(f"{API}/v1/bot/rooms/{room}/atis", headers=H, json={
"freq": 118850, "letter": "C",
"text": "Information Charlie, one six five six Zulu. Wind two eight zero at one two. Visibility one zero. "
"Landing and departing runway two eight left. Advise on initial contact you have information Charlie."})
requests.post(f"{API}/v1/bot/rooms/{room}/transmit", headers=H, json={"freq": 120500, "text": "All stations, tower closing in five minutes."})Official SDKs for JavaScript (Node 22+) and Python (3.10+) wrap the gateway, reconnects, heartbeats, rate limits and these calls. Ask for access at orchestr@orchestrsim.com while they are in preview.
6. Rate limits
- 5 requests per second per bot, burst 20. Over the limit: HTTP 429 with
{"error":"rate_limited"}; wait and retry. - One transmission at a time per bot (half duplex, like everyone else). Transmissions are capped at 30 seconds.
- 30 messages per minute per bot.
7. Rules for bots
- Bots are always labelled BOT on the radio and in the app. Never present a bot as a person or as a real ATC service.
- Bots cannot send direct messages to users under 18, and everything a bot says goes through automatic moderation.
- Collect only the data your bot needs, keep it secure and delete it on request. Never sell it.
- Follow the Community Guidelines and section 9 of the Terms. We can revoke tokens and remove bots that break them.
8. First-party bots
- ATIS Bot: builds the ATIS from the latest METAR (aviationweather.gov, NOAA) and updates the letter when the weather changes.
- Tower Bot and Ground Bot: rule-based stand-in controllers for empty positions, answering standard requests with standard phraseology.
- Traffic Bot: scripted AI traffic in scenario rooms.
- Event Bot: announces scheduled room events.
- Moderation Bot: automatic moderation of text.
Full protocol, including audio frames for client developers, is available on request.