Roblox ↔ Lyreto chat bridge
Your players chat in the game, your community sees it live in Lyreto, and replies show up in game chat. Free for every server.
How it works
A Roblox game is linked to one text channel in your Lyreto server. Players chatting in the game show up in that channel live, each under their own Roblox name with a ROBLOX tag. Messages people send in the channel show up in the game's chat as [Lyreto] name: message.
Making a Guts&Bolts game? The same module works there: see Guts&Bolts games. Its players show up with a GUTS&BOLTS tag.
The game talks to Lyreto with Roblox's own HttpService from the server (never from players' devices). Bridged messages are real channel messages: your mods delete them like any other, and banning a bridged player (or Block in Game Bridge settings) stops them.
Current module: v1.1.1. Already using an older one? Delete the old LyretoBridge from ServerScriptService and insert the new .rbxmx; your start Script stays as it is.
Set it up in 5 steps
- Make the bridge. In your Lyreto server open Server Settings → Game Bridge (owner or Manage Server). Pick the channel, optionally lock it to your Roblox universe id, and press Create. Copy the key: it's shown once. You can make up to 3 bridges per server.
- Add the module. In Roblox Studio, right-click ServerScriptService → Insert from File… and pick
LyretoBridge.rbxmx. It must stay in ServerScriptService; it refuses to start from ReplicatedStorage or Workspace. - Add your key as a secret. In the Creator Hub open your experience → Secrets and add a secret named
LyretoKeywith the key, for the domainlyreto.com(for Studio tests: Game Settings → Security → Secrets). Then add a Script in ServerScriptService:
A secret never sits in a script, so it can't leak with a copied place or a shared model. The module sends it withlocal HttpService = game:GetService("HttpService") local LyretoBridge = require(game:GetService("ServerScriptService").LyretoBridge) LyretoBridge.Start({ ApiKey = HttpService:GetSecret("LyretoKey") })apiKey:AddPrefix("Bearer ")and never prints it. A plain key still works too:LyretoBridge.Start({ ApiKey = "lyb_..." }), or a ModuleScriptServerScriptService.LyretoBridgeConfigthat returns{ ApiKey = ... }. Never put a key in a LocalScript, ReplicatedStorage or StarterGui: players can read anything there. - Turn on HTTP. Game Settings → Security → Allow HTTP Requests, then publish.
- Test it. Press Play and say hi. It shows up in your channel within a second or two; reply in the channel and it appears in the game chat as
[Lyreto] you: reply.
Roblox chat filtering (required)
Roblox requires that any text shown to players is filtered by Roblox. The module filters every incoming Lyreto message with TextService:FilterStringAsync and then GetChatForUserAsync for each player (falling back to GetNonChatStringForBroadcastAsync when that errors or comes back empty) before it is displayed. In a live game, if filtering fails or Roblox returns nothing, the message isn't shown. In Roblox Studio the filter often returns nothing, so there (a test session only) the module shows the line unfiltered so you can see the bridge working. Never display text from the API without filtering it. Player messages are also run through GetNonChatStringForBroadcastAsync before they leave the game.
Links never cross the bridge in either direction: Lyreto removes URLs, bare domains and invites, and the module strips them again. Don't add anything that sends players to off-platform links in your game; Roblox's rules don't allow it.
API reference
Base URL https://lyreto.com/api/bridge/v1. Send your key on every request as Authorization: Bearer lyb_… (or X-Lyreto-Bridge-Key). JSON in, JSON out.
POST /messages
Game → channel. One message, or {"messages": [...]} with up to 10.
POST https://lyreto.com/api/bridge/v1/messages
{
"universeId": 123456789, "placeId": 987654321, "jobId": "game.JobId",
"robloxUserId": 1, "robloxDisplayName": "Builderman", "text": "hello from the game"
}
201 {"ok": true, "messageId": 4242}
200 {"ok": false, "dropped": "flagged" | "blocked" | "filtered" | "empty", "reason"?: "..."}
batch: 200 {"results": [ ...one per message... ]}
Text is cut to 300 characters; links, invites and mention syntax are removed; your server's AutoMod and Scam links rules apply. Accounts flagged by Clearsight Shield are dropped and counted, never posted.
GET /messages
Channel → game. Call it with no cursor first: you get the current cursor and no messages (old chat isn't replayed). Then pass the cursor back. Add wait=1..20 to long-poll: the answer comes as soon as someone speaks.
GET https://lyreto.com/api/bridge/v1/messages?cursor=4242&wait=10&jobId=<game.JobId>&universeId=<game.GameId>
200 {"cursor": "4250", "messages": [
{"id": "4249", "authorName": "kermit", "text": "gg everyone", "createdAt": "2026-10-26T15:00:00.000Z"}
]}
Up to 50 messages per answer, plain text only: no links, attachments, embeds, emails or user ids. Messages from bots, webhooks and other bridged players are skipped.
GET /ping
Checks the key and returns the bridge name and channel.
Errors
| Status | Meaning |
|---|---|
| 401 | Missing, wrong, rotated or deleted key. The module stops. |
| 403 | Bridge turned off (by you or Lyreto staff), or a universe id that isn’t linked. |
| 410 | The linked channel was deleted. |
| 429 | Rate limited. Wait retry_after seconds (also in the Retry-After header). |
| 503 | The Game Bridge is switched off right now. Try again later. |
Rate limits
| What | Limit |
|---|---|
| Messages in, per key (all game servers together) | 600 a minute |
| Messages in, per Roblox player | 5 per 10 seconds, 20 a minute |
| Polls, per key | 1200 a minute |
| Polls, per game server (jobId) | 60 a minute |
| Roblox HttpService (Roblox’s own limit) | 500 requests a minute per game server. The module budgets itself to 120 by default (sends in batches every second, long-polls every 2 s). |
Module options
LyretoBridge.Start({
ApiKey = HttpService:GetSecret("LyretoKey"), -- a Secret (best) or a string "lyb_..."; with none, Start() tries this secret itself
Prefix = "[Lyreto]", -- shown before every line
SendPlayerChat = true, -- game -> Lyreto
ShowLyretoChat = true, -- Lyreto -> game
IgnoreCommands = true, -- skip messages starting with "/"
ShouldSend = function(player, message) return true end, -- your own rule, e.g. skip team chat
PollWait = 10, MinPollGap = 2, FlushInterval = 1,
RequestBudgetPerMinute = 120, -- this module's cap (max 300)
Color = Color3.fromRGB(167, 139, 250),
Platform = nil, -- "Roblox" or "GutsAndBolts"; found by itself
Debug = false, -- true prints every step to the Output window (server and client)
})
The module shows messages through a small LocalScript (LyretoBridgeClient, inside the .rbxmx) that it installs for every player. It works with TextChatService and the legacy chat.
Moderation
Delete bridged messages like any other. To stop a player, right-click their name → Block from Game Bridge, use the Block button in Server Settings → Game Bridge, or ban them from the server. Rotate the key any time; the old one stops working at once.
Guts&Bolts games
The same LyretoBridge module runs in a Guts&Bolts (G&B) game, with the same calls. G&B players show up in your channel under their G&B name with a GUTS&BOLTS tag, and channel messages go back into the game chat. Blocking, bans, AutoMod and the game lock work exactly as for Roblox.
Use a secret for the key. Anyone can host a G&B game, and whoever hosts it can read its scripts, so a key typed into a script would not stay secret. A G&B secret stays on the Guts&Bolts server: the game only names it (HttpService:GetSecret("LyretoKey")), G&B puts the real key into the request on its own server, and the host never sees it. The same line works on Roblox, so one script fits both.
For game creators
- Make the bridge. Server Settings → Game Bridge, choose Guts&Bolts, pick the channel, and optionally lock it to your G&B game id (the number in
gutsandbolts.net/app/#/game/<id>; pasting that whole link works too). Copy the key: it's shown once. - Save the key as a secret. On the G&B website open your game's Configure page, turn on Web requests, and add a secret named
LyretoKeyforlyreto.comwith the key. Never paste the key into a Script or LocalScript. - Add the module. Put LyretoBridge.lua in a ModuleScript called
LyretoBridgein ServerScriptService, and start it from a Script there:local HttpService = game:GetService("HttpService") local LyretoBridge = require(game:GetService("ServerScriptService").LyretoBridge) LyretoBridge.Start({ ApiKey = HttpService:GetSecret("LyretoKey") }) - Publish and test. Web requests only run on a published game's server. Say hi in the game; it shows up in your channel with the GUTS&BOLTS tag. Reply in the channel and it appears in game chat as
[Lyreto] you: reply.
How Lyreto knows it's Guts&Bolts. G&B's server adds X-GutsAndBolts-Game, X-GutsAndBolts-Server (dedicated, player or studio) and X-GutsAndBolts-Host to every web request a game makes (scripts can't set them). With those headers Lyreto treats robloxUserId as the player's G&B user number, never looks it up on Roblox, takes the game id from X-GutsAndBolts-Game, and shows the GUTS&BOLTS tag. Text game ids are fine: older G&B games have a text game.GameId (like game-a243aeed03), newer ones a number, and Lyreto takes either in universeId/placeId (letters, digits, - and _, up to 64). The game lock is checked against the game number in G&B's X-GutsAndBolts-Game header (the one in the game's page address), not the id the script sends, so a game can't pretend to be another; only without that header is gameId (or universeId) used. In Game Bridge settings each G&B player shows which kind of server their last message came from and which account hosted it. The headers never replace the key: the key is what lets a request in. A Roblox bridge's key used from a G&B game gets 409 (make a Guts&Bolts bridge instead).
On G&B the module skips Roblox's TextService (G&B hands scripts chat that already went through its own filter), shows Lyreto lines with TextChatService:DisplaySystemMessage (G&B filters those too), keeps long polls at 7 s (G&B stops a web request after 10 s) and stays under G&B's 120 requests a minute per server.
From Guts&Bolts' own servers (server to server)
For a relay that runs on G&B's backend instead of in the game: same API as above, same key (Authorization: Bearer lyb_…). Without the X-GutsAndBolts-* headers a Guts&Bolts bridge takes the G&B fields below (a Roblox key only takes the Roblox ones).
| Field | What to send |
|---|---|
gnbUserId (required) | The player's G&B user number (the same id your OAuth userinfo returns). Blocks and bans follow this id. |
gnbUsername, gnbDisplayName | Shown as the name in the channel (display name first). Letters, digits, _ . - and spaces, up to 40. |
gameId | The G&B game id. Must match if the bridge is locked to a game (403 otherwise). Also accepted on GET /messages. |
serverId | One running game server/session. Used for the per-server poll limit (like Roblox's jobId). |
avatarUrl (optional) | The player's picture, only https://gutsandbolts.net/avatar/…. |
text | The chat line, after G&B's own text filter. Up to 2000 in, cut to 300 characters. |
# game -> Lyreto (one line, or {"messages": [...]} with up to 10)
curl -X POST https://lyreto.com/api/bridge/v1/messages \
-H "Authorization: Bearer lyb_..." -H "Content-Type: application/json" \
-d '{"gameId":"12345","serverId":"s-8f2c","gnbUserId":5,"gnbUsername":"strat","gnbDisplayName":"Strat","text":"hello from G&B"}'
201 {"ok": true, "messageId": 4242}
200 {"ok": false, "dropped": "blocked" | "filtered" | "empty"}
# Lyreto -> game (first call without a cursor, then pass it back; wait = long-poll seconds)
curl "https://lyreto.com/api/bridge/v1/messages?gameId=12345&serverId=s-8f2c&wait=20&cursor=4242" \
-H "Authorization: Bearer lyb_..."
200 {"cursor": "4250", "messages": [{"id": "4249", "authorName": "kermit", "text": "gg everyone", "createdAt": "..."}]}
Ready-made relay for G&B's backend (JavaScript, runs on Node 18+ or a Cloudflare Worker / Durable Object; it uses only fetch). Call sendChat for each public chat line a game server reports, and run pollLoop once per running game with a bridge key, handing each line to the host as a system chat line:
const LYRETO = "https://lyreto.com/api/bridge/v1";
// game -> Lyreto: lines = [{ userId, username, displayName, text }] (at most 10)
export async function sendChat(key, gameId, serverId, lines) {
const messages = lines.map((l) => ({
gameId: String(gameId), serverId: String(serverId),
gnbUserId: Number(l.userId), gnbUsername: l.username, gnbDisplayName: l.displayName, text: l.text,
}));
const r = await fetch(LYRETO + "/messages", {
method: "POST",
headers: { "Authorization": "Bearer " + key, "Content-Type": "application/json" },
body: JSON.stringify({ messages }),
});
if (r.status === 429) return { retryAfter: Number(r.headers.get("Retry-After") || 5) };
if ([401, 403, 410].includes(r.status)) return { stop: true, status: r.status }; // key wrong / bridge off / channel gone
return r.json();
}
// Lyreto -> game: show(line) must run G&B's text filter, then add "[Lyreto] name: text" as a system chat line.
export async function pollLoop(key, gameId, serverId, show, isRunning) {
let cursor = "";
while (isRunning()) {
const q = "?gameId=" + encodeURIComponent(gameId) + "&serverId=" + encodeURIComponent(serverId) + "&wait=20" + (cursor ? "&cursor=" + cursor : "");
const r = await fetch(LYRETO + "/messages" + q, { headers: { "Authorization": "Bearer " + key } });
if ([401, 403, 410].includes(r.status)) return r.status; // stop for this game
if (!r.ok) { await new Promise((s) => setTimeout(s, Number(r.headers.get("Retry-After") || 5) * 1000)); continue; }
const j = await r.json();
cursor = j.cursor;
for (const m of j.messages) show({ from: "[Lyreto] " + m.authorName, text: m.text });
if (!j.messages.length) await new Promise((s) => setTimeout(s, 1000)); // at least 1 s between empty answers
}
}
What G&B must do on its side:
- Send only public chat lines from signed-in players of that game: no whispers, no system lines, no guest accounts, no lines from Lyreto itself.
- Run G&B's own text filter on everything shown in the game, including lines from Lyreto; skip a line the filter blanks out. Lyreto removes links both ways, and so should G&B: no links, ever.
- Keep the key on G&B's servers only (a game setting the owner fills in); never send it to the host computer or to players.
- Honour
429+Retry-After; stop for that game on401,403or410; one long-poll per running server (or one per game, fanned out to its servers).
Troubleshooting
- Game → Lyreto works, but Lyreto messages don't show in the game. Messages from Lyreto may not show in an unpublished game, because Roblox's chat filter only works properly in a published game. Publish it (File → Publish to Roblox) and test again. Make sure you have module v1.1.1 or newer: older versions treated an empty answer from Roblox's filter as blocked and showed nothing.
- See where a message stops. Start it with
LyretoBridge.Start({ ApiKey = "lyb_...", Debug = true }), press Play, send a message from Lyreto, and open View → Output. The server log showsgot 1 msg(s) from lyreto,lyreto msg: …, thenshown to <player>ornot shown to <player> (Roblox filter blocked it); the client log shows[LyretoBridge client] got: …. - Test with a real sentence. Roblox's filter hides numbers and some short words, so a message like
1can come back as#and isn't shown. - Nothing at all. Check Game Settings → Security → Allow HTTP Requests is on and the module is in ServerScriptService. The module warns in Output when HTTP is off or the key is wrong.
- Roblox: "Can't find secret". Add the
LyretoKeysecret in the Creator Hub (domainlyreto.com), or in Game Settings → Security → Secrets for Studio tests. - Guts&Bolts: game → Lyreto doesn't arrive. Use module v1.1.1 or newer: from v1.1.1 the module prints the reason in Output whenever Lyreto refuses a request, even without
Debug. A403about the game lock means the bridge is locked to another game number: set the number from the game's page address, or clear the lock. - Guts&Bolts: nothing happens. Turn on Web requests on the game's Configure page, add the
LyretoKeysecret forlyreto.com, and publish: an unpublished game can't make web requests. WithDebug = truethe module prints G&B's own reason (for example "this game has no secret called LyretoKey"). A409means the key is from a Roblox bridge: make a Guts&Bolts bridge.
Changelog
- v1.1.1 (Nov 2026): Guts&Bolts games with a text game id (older games, like
game-a243aeed03) bridge chat: the module sends the id as a number when it is one and as text otherwise, and Lyreto accepts both for G&B (Roblox ids stay numbers only). A request Lyreto refuses for good (400) now prints its reason in Output withoutDebug, once per reason. Lyreto's G&B game lock now checks the game number from G&B's header. - v1.1.0 (Nov 2026): the key can be a Secret:
LyretoBridge.Start({ ApiKey = HttpService:GetSecret("LyretoKey") }), sent withAddPrefix("Bearer "); with no key given,Start()tries that secret itself. The module runs in Guts&Bolts games too (no Roblox filter there, lines shown withDisplaySystemMessage, 7 s polls). Players without an account id (Studio test players, guests) are skipped instead of failing a batch. Lyreto reads Guts&Bolts'X-GutsAndBolts-*headers and shows those players with a GUTS&BOLTS tag. - Nov 2026: Guts&Bolts bridges (platform picker in Game Bridge settings, G&B game id lock,
gnbUserId/gameId/serverIdfields). - v1.0.2: Lyreto messages now show when Roblox's per-player filter returns an empty string: the module falls back to the broadcast filter, and in Roblox Studio shows the line unfiltered for testing (live games always filter). More
Debuglogging on the server and the client. - v1.0: first release.
FAQ
Is it free?
Yes. Every Lyreto server can make up to 3 bridges.
Does it follow Roblox’s rules?
Every message shown in the game is filtered by Roblox’s TextService for each player first, links are removed both ways, and nothing in the game points players to outside sites.
Can players see my key?
No. Best: keep it as a secret (HttpService:GetSecret("LyretoKey")), so it is never in a script at all. A plain key is safe too as long as the module and the key stay in ServerScriptService; the module refuses to start from ReplicatedStorage or Workspace.
Does it work with Guts&Bolts?
Yes. Pick Guts&Bolts when you make the bridge, save the key as the game’s LyretoKey secret, and use the same LyretoBridge module; see the Guts&Bolts section above.
What if a scammer joins my game?
Accounts flagged by Clearsight Shield are dropped before they reach your channel, and your mods can block anyone from the bridge.
Bring your game’s community together.
Free. No credit card. Works in your browser, on iPhone and Android, and on Mac, Windows and Linux.