[{"data":1,"prerenderedAt":170},["ShallowReactive",2],{"doc:guides\u002Ftelegram":3},{"title":4,"description":5,"url":6,"markdownPath":7,"file":8,"section":9,"sectionTitle":10,"html":11,"toc":12,"navigation":29,"previous":168,"next":169},"Telegram","Open L4 Servers inside Telegram as a Mini App, sign in with Telegram, and what a Server operator must configure for it.","\u002Fdocs\u002Fguides\u002Ftelegram","\u002Fdocs\u002Fguides\u002Ftelegram.md","docs\u002Fguides\u002Ftelegram.md","guides","Guides","\u003Cp>L4 can run inside Telegram as a \u003Cstrong>Mini App\u003C\u002Fstrong>. The \u003Ca href=\"\u002Fdocs\u002Fconcepts\u002Fserver-and-shell\">llll.gg Shell\u003C\u002Fa> works there like it does in a browser: it shows the Servers saved on your device and embeds each Server&#39;s own Client. Each Server still keeps its own Accounts and sessions; Telegram never grants membership.\u003C\u002Fp>\n\u003Ch2 id=\"open-a-server-in-telegram\">\u003Ca class=\"heading-anchor\" href=\"#open-a-server-in-telegram\">Open a Server in Telegram\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>When the Shell opens as a Telegram Mini App, it fits itself to Telegram&#39;s window and safe areas. A Mini App link whose start parameter is \u003Ccode>server_&lt;Server UUID&gt;\u003C\u002Fcode> opens that Server directly. If the Server is not saved on the device yet, the Shell looks it up by its UUID and connects to it.\u003C\u002Fp>\n\u003Cp>A Server&#39;s own Client can also be opened as a Mini App. A start parameter of \u003Ccode>invite_&lt;code&gt;\u003C\u002Fcode> then opens that invitation.\u003C\u002Fp>\n\u003Ch2 id=\"sign-in-with-telegram\">\u003Ca class=\"heading-anchor\" href=\"#sign-in-with-telegram\">Sign in with Telegram\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>When you open a Server through the Shell in Telegram and that Server supports Telegram Mini App sign-in, the Shell passes your Telegram launch data to the Server and you are signed in automatically:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>If your Telegram account is already linked to an Account on that Server, you are signed in to it.\u003C\u002Fli>\n\u003Cli>If it is not linked and the Server&#39;s registration is open, a new Account is created for you from your Telegram name.\u003C\u002Fli>\n\u003Cli>If registration is closed, sign-in is refused; use another login method or an invitation.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>The Telegram proof is checked by the Server itself and is valid for five minutes. If sign-in fails, close the Mini App and open it again. You can always sign in with the Server&#39;s ordinary login instead.\u003C\u002Fp>\n\u003Cp>Linking Telegram to an existing Account must be done explicitly from that Account; L4 never matches Accounts by name or email.\u003C\u002Fp>\n\u003Cblockquote class=\"callout callout-note\">\u003Cp class=\"callout-title\">Note\u003C\u002Fp>\u003Cp>Telegram does not replace local Accounts. Each Server has its own Accounts, so signing in with Telegram on one Server does not sign you in to another.\u003C\u002Fp>\n\u003C\u002Fblockquote>\n\u003Ch2 id=\"telegram-login-in-a-browser\">\u003Ca class=\"heading-anchor\" href=\"#telegram-login-in-a-browser\">Telegram login in a browser\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Separately from the Mini App, the Owner can offer \u003Cstrong>Continue with Telegram\u003C\u002Fstrong> on the Server&#39;s sign-in page:\u003C\u002Fp>\n\u003Col>\n\u003Cli>Open \u003Cstrong>Server settings → Authentication\u003C\u002Fstrong>.\u003C\u002Fli>\n\u003Cli>Turn on \u003Cstrong>Enable Telegram\u003C\u002Fstrong> and enter its \u003Cstrong>Client ID\u003C\u002Fstrong> and \u003Cstrong>Client secret\u003C\u002Fstrong>.\u003C\u002Fli>\n\u003Cli>Use the callback address shown there, \u003Ccode>\u002Fapi\u002Fauth\u002Fcallback\u002Ftelegram\u003C\u002Fcode> on your Server, when you create those credentials.\u003C\u002Fli>\n\u003Cli>Select \u003Cstrong>Save changes\u003C\u002Fstrong>.\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Ch2 id=\"for-operators-mini-app-sign-in\">\u003Ca class=\"heading-anchor\" href=\"#for-operators-mini-app-sign-in\">For operators: Mini App sign-in\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Mini App sign-in is off until the Server&#39;s deployment environment has one of:\u003C\u002Fp>\n\u003Cdiv class=\"table-wrap\">\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Variable\u003C\u002Fth>\n\u003Cth>Use\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\u003Ctr>\n\u003Ctd>\u003Ccode>TELEGRAM_BOT_TOKEN\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>The token of a Telegram bot you own. The Server verifies Mini App data with it.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Ccode>TELEGRAM_TRUSTED_BOT_ID\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>The ID of a shared bot you explicitly trust. The Server verifies Telegram&#39;s public signature for that bot and never receives the bot&#39;s secret.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\u003C\u002Ftable>\u003C\u002Fdiv>\n\u003Cp>A Server with either one reports Telegram support in its public metadata, and the Shell then passes Telegram&#39;s launch data to that Server&#39;s Client. Without them, the Server&#39;s ordinary login still works inside Telegram. L4 has no guided setup for these variables yet; set them where you manage the deployment&#39;s other secrets.\u003C\u002Fp>\n\u003Ch2 id=\"related\">\u003Ca class=\"heading-anchor\" href=\"#related\">Related\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>\u003Ca href=\"\u002Fdocs\u002Fconcepts\u002Fserver-and-shell\">Server and Shell\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"\u002Fdocs\u002Fget-started\u002Fconnect-a-server\">Connect a Server\u003C\u002Fa>\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"\u002Fdocs\u002Fguides\u002Fnotifications\">Notifications\u003C\u002Fa>\u003C\u002Fli>\n\u003C\u002Ful>\n",[13,17,20,23,26],{"id":14,"text":15,"depth":16},"open-a-server-in-telegram","Open a Server in Telegram",2,{"id":18,"text":19,"depth":16},"sign-in-with-telegram","Sign in with Telegram",{"id":21,"text":22,"depth":16},"telegram-login-in-a-browser","Telegram login in a browser",{"id":24,"text":25,"depth":16},"for-operators-mini-app-sign-in","For operators: Mini App sign-in",{"id":27,"text":28,"depth":16},"related","Related",[30,55,83,99,118,140,158],{"id":31,"title":32,"pages":33},"get-started","Get started",[34,37,40,43,46,49,52],{"title":35,"url":36},"What is L4","\u002Fdocs\u002Fget-started\u002Fwhat-is-l4",{"title":38,"url":39},"Choose how to run your Server","\u002Fdocs\u002Fget-started\u002Fchoose-how-to-run",{"title":41,"url":42},"Create a Server on Cloudflare","\u002Fdocs\u002Fget-started\u002Fcreate-on-cloudflare",{"title":44,"url":45},"Install on a VPS","\u002Fdocs\u002Fget-started\u002Finstall-on-a-vps",{"title":47,"url":48},"Connect to a Server","\u002Fdocs\u002Fget-started\u002Fconnect-a-server",{"title":50,"url":51},"Invite your team","\u002Fdocs\u002Fget-started\u002Finvite-your-team",{"title":53,"url":54},"Create your first Agent","\u002Fdocs\u002Fget-started\u002Ffirst-agent",{"id":56,"title":57,"pages":58},"cloudflare","Cloudflare",[59,62,65,68,71,74,77,80],{"title":60,"url":61},"L4 on Cloudflare","\u002Fdocs\u002Fcloudflare\u002Foverview",{"title":63,"url":64},"Cloudflare access","\u002Fdocs\u002Fcloudflare\u002Faccess",{"title":66,"url":67},"Costs and limits","\u002Fdocs\u002Fcloudflare\u002Fcosts-and-limits",{"title":69,"url":70},"Custom domain","\u002Fdocs\u002Fcloudflare\u002Fcustom-domain",{"title":72,"url":73},"Mail on Cloudflare","\u002Fdocs\u002Fcloudflare\u002Fmail",{"title":75,"url":76},"Update a Cloudflare Server","\u002Fdocs\u002Fcloudflare\u002Fupdates",{"title":78,"url":79},"Backups on Cloudflare","\u002Fdocs\u002Fcloudflare\u002Fbackups",{"title":81,"url":82},"Remove a Cloudflare Server","\u002Fdocs\u002Fcloudflare\u002Fremove-a-server",{"id":84,"title":85,"pages":86},"self-host","Self-host",[87,90,93,96],{"title":88,"url":89},"Run a Server on a VPS","\u002Fdocs\u002Fself-host\u002Fvps",{"title":91,"url":92},"Run a Server with Docker Compose","\u002Fdocs\u002Fself-host\u002Fdocker",{"title":94,"url":95},"Run a Server on Coolify","\u002Fdocs\u002Fself-host\u002Fcoolify",{"title":97,"url":98},"Compute Nodes","\u002Fdocs\u002Fself-host\u002Fcompute-nodes",{"id":100,"title":101,"pages":102},"concepts","Concepts",[103,106,109,112,115],{"title":104,"url":105},"Servers and the Shell","\u002Fdocs\u002Fconcepts\u002Fserver-and-shell",{"title":107,"url":108},"Accounts, Members and Roles","\u002Fdocs\u002Fconcepts\u002Faccounts-members-roles",{"title":110,"url":111},"Agents, Tasks and Runs","\u002Fdocs\u002Fconcepts\u002Fagents-tasks-runs",{"title":113,"url":114},"Files and backups","\u002Fdocs\u002Fconcepts\u002Ffiles-and-backups",{"title":116,"url":117},"Releases and updates","\u002Fdocs\u002Fconcepts\u002Freleases-and-updates",{"id":119,"title":120,"pages":121},"agents","Agents and MCP",[122,125,128,131,134,137],{"title":123,"url":124},"Agents overview","\u002Fdocs\u002Fagents\u002Foverview",{"title":126,"url":127},"Models and Providers","\u002Fdocs\u002Fagents\u002Fmodels-and-providers",{"title":129,"url":130},"Connect an MCP client","\u002Fdocs\u002Fagents\u002Fmcp",{"title":132,"url":133},"External agents","\u002Fdocs\u002Fagents\u002Fexternal-agents",{"title":135,"url":136},"Repositories and code work","\u002Fdocs\u002Fagents\u002Frepositories",{"title":138,"url":139},"Schedules","\u002Fdocs\u002Fagents\u002Fschedules",{"id":9,"title":10,"pages":141},[142,145,148,151,154,157],{"title":143,"url":144},"Chat","\u002Fdocs\u002Fguides\u002Fchat",{"title":146,"url":147},"Projects and Tasks","\u002Fdocs\u002Fguides\u002Fprojects-and-tasks",{"title":149,"url":150},"Mail","\u002Fdocs\u002Fguides\u002Fmail",{"title":152,"url":153},"Calls and Live","\u002Fdocs\u002Fguides\u002Fcalls",{"title":155,"url":156},"Notifications","\u002Fdocs\u002Fguides\u002Fnotifications",{"title":4,"url":6},{"id":159,"title":160,"pages":161},"reference","Reference",[162,165],{"title":163,"url":164},"Glossary","\u002Fdocs\u002Freference\u002Fglossary",{"title":166,"url":167},"Troubleshooting","\u002Fdocs\u002Freference\u002Ftroubleshooting",{"title":155,"url":156},{"title":163,"url":164},1793335826365]