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

  1. 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.
  2. 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.
  3. Add your key as a secret. In the Creator Hub open your experience → Secrets and add a secret named LyretoKey with the key, for the domain lyreto.com (for Studio tests: Game Settings → Security → Secrets). Then add a Script in ServerScriptService:
    local HttpService = game:GetService("HttpService")
    local LyretoBridge = require(game:GetService("ServerScriptService").LyretoBridge)
    LyretoBridge.Start({ ApiKey = HttpService:GetSecret("LyretoKey") })
    A secret never sits in a script, so it can't leak with a copied place or a shared model. The module sends it with apiKey:AddPrefix("Bearer ") and never prints it. A plain key still works too: LyretoBridge.Start({ ApiKey = "lyb_..." }), or a ModuleScript ServerScriptService.LyretoBridgeConfig that returns { ApiKey = ... }. Never put a key in a LocalScript, ReplicatedStorage or StarterGui: players can read anything there.
  4. Turn on HTTP. Game Settings → Security → Allow HTTP Requests, then publish.
  5. 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

StatusMeaning
401Missing, wrong, rotated or deleted key. The module stops.
403Bridge turned off (by you or Lyreto staff), or a universe id that isn’t linked.
410The linked channel was deleted.
429Rate limited. Wait retry_after seconds (also in the Retry-After header).
503The Game Bridge is switched off right now. Try again later.

Rate limits

WhatLimit
Messages in, per key (all game servers together)600 a minute
Messages in, per Roblox player5 per 10 seconds, 20 a minute
Polls, per key1200 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

  1. 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.
  2. 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 LyretoKey for lyreto.com with the key. Never paste the key into a Script or LocalScript.
  3. Add the module. Put LyretoBridge.lua in a ModuleScript called LyretoBridge in 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") })
  4. 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).

FieldWhat 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, gnbDisplayNameShown as the name in the channel (display name first). Letters, digits, _ . - and spaces, up to 40.
gameIdThe G&B game id. Must match if the bridge is locked to a game (403 otherwise). Also accepted on GET /messages.
serverIdOne 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/….
textThe 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:

Troubleshooting

Changelog

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.