[{"data":1,"prerenderedAt":446},["ShallowReactive",2],{"navigation_docs":3,"-connectors-telegram":139,"-connectors-telegram-surround":441},[4,8,12,16,20,24,28,32,59,63,117,121,135],{"title":5,"path":6,"stem":7},"Introduction","\u002Fintroduction","1.introduction",{"title":9,"path":10,"stem":11},"Memory","\u002Fmemory","10.memory",{"title":13,"path":14,"stem":15},"Customization","\u002Fcustomization","11.customization",{"title":17,"path":18,"stem":19},"Deployment","\u002Fdeployment","12.deployment",{"title":21,"path":22,"stem":23},"Reference","\u002Freference","13.reference",{"title":25,"path":26,"stem":27},"Quickstart","\u002Fquickstart","2.quickstart",{"title":29,"path":30,"stem":31},"Installation","\u002Finstallation","3.installation",{"title":33,"icon":34,"path":35,"stem":36,"children":37,"page":58},"Connectors","i-lucide-cable","\u002Fconnectors","4.connectors",[38,42,46,50,54],{"title":39,"path":40,"stem":41},"Telegram","\u002Fconnectors\u002Ftelegram","4.connectors\u002F1.telegram",{"title":43,"path":44,"stem":45},"Slack","\u002Fconnectors\u002Fslack","4.connectors\u002F2.slack",{"title":47,"path":48,"stem":49},"Email","\u002Fconnectors\u002Femail","4.connectors\u002F3.email",{"title":51,"path":52,"stem":53},"API","\u002Fconnectors\u002Fapi","4.connectors\u002F4.api",{"title":55,"path":56,"stem":57},"Terminal","\u002Fconnectors\u002Fterminal","4.connectors\u002F5.terminal",false,{"title":60,"path":61,"stem":62},"Attachments","\u002Fattachments","5.attachments",{"title":64,"icon":65,"path":66,"stem":67,"children":68,"page":58},"Tools","i-lucide-wrench","\u002Ftools","6.tools",[69,73,77,81,85,89,93,97,101,105,109,113],{"title":70,"path":71,"stem":72},"File Manager","\u002Ftools\u002Ffile-manager","6.tools\u002F1.file-manager",{"title":74,"path":75,"stem":76},"Text-to-Speech","\u002Ftools\u002Ftext-to-speech","6.tools\u002F10.text-to-speech",{"title":78,"path":79,"stem":80},"Confirmations","\u002Ftools\u002Fconfirmations","6.tools\u002F11.confirmations",{"title":82,"path":83,"stem":84},"Adding Custom Tools","\u002Ftools\u002Fadding-custom-tools","6.tools\u002F12.adding-custom-tools",{"title":86,"path":87,"stem":88},"Image Manager","\u002Ftools\u002Fimage-manager","6.tools\u002F2.image-manager",{"title":90,"path":91,"stem":92},"Web Request","\u002Ftools\u002Fweb-request","6.tools\u002F3.web-request",{"title":94,"path":95,"stem":96},"Reminders","\u002Ftools\u002Freminders","6.tools\u002F4.reminders",{"title":98,"path":99,"stem":100},"Heartbeats","\u002Ftools\u002Fheartbeats","6.tools\u002F5.heartbeats",{"title":102,"path":103,"stem":104},"Email Manager","\u002Ftools\u002Femail-manager","6.tools\u002F6.email-manager",{"title":106,"path":107,"stem":108},"Calendar","\u002Ftools\u002Fcalendar","6.tools\u002F7.calendar",{"title":110,"path":111,"stem":112},"Read Database","\u002Ftools\u002Fread-database","6.tools\u002F8.read-database",{"title":114,"path":115,"stem":116},"Headless Browser","\u002Ftools\u002Fbrowser","6.tools\u002F9.browser",{"title":118,"path":119,"stem":120},"Tinker","\u002Ftinker","7.tinker",{"title":122,"icon":123,"path":124,"stem":125,"children":126,"page":58},"Skills","i-lucide-sparkles","\u002Fskills","8.skills",[127,131],{"title":128,"path":129,"stem":130},"Overview","\u002Fskills\u002Foverview","8.skills\u002F1.overview",{"title":132,"path":133,"stem":134},"Adding Custom Skills","\u002Fskills\u002Fadding-custom-skills","8.skills\u002F2.adding-custom-skills",{"title":136,"path":137,"stem":138},"Personas","\u002Fpersonas","9.personas",{"id":140,"title":39,"body":141,"description":434,"extension":435,"links":436,"meta":437,"navigation":438,"path":40,"seo":439,"stem":41,"__hash__":440},"docs\u002F4.connectors\u002F1.telegram.md",{"type":142,"value":143,"toc":424},"minimark",[144,148,163,167,176,204,207,225,232,236,247,290,297,307,311,322,325,328,356,360,363,366,370,373,376,379,390,393,413,417,420],[145,146,5],"h2",{"id":147},"introduction",[149,150,151,152,162],"p",{},"The Telegram connector receives messages from a Telegram bot, in direct chats with the owner and in any group the bot has been added to. It uses ",[153,154,158],"a",{"href":155,"rel":156},"https:\u002F\u002Fgithub.com\u002Firazasyed\u002Ftelegram-bot-sdk",[157],"nofollow",[159,160,161],"code",{},"irazasyed\u002Ftelegram-bot-sdk",".",[145,164,166],{"id":165},"setup","Setup",[149,168,169,170,175],{},"Create a bot with ",[153,171,174],{"href":172,"rel":173},"https:\u002F\u002Ft.me\u002FBotFather",[157],"@BotFather"," to get a token. Then run:",[177,178,183],"pre",{"className":179,"code":180,"language":181,"meta":182,"style":182},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","php artisan laraclaw:setup-connector telegram\n","bash","",[159,184,185],{"__ignoreMap":182},[186,187,190,194,198,201],"span",{"class":188,"line":189},"line",1,[186,191,193],{"class":192},"sBMFI","php",[186,195,197],{"class":196},"sfazB"," artisan",[186,199,200],{"class":196}," laraclaw:setup-connector",[186,202,203],{"class":196}," telegram\n",[149,205,206],{},"The wizard asks for the bot token and your Telegram chat ID, and writes:",[177,208,212],{"className":209,"code":210,"language":211,"meta":182,"style":182},"language-env shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","LARACLAW_TELEGRAM_ENABLED=true\nLARACLAW_TELEGRAM_TOKEN=...\n","env",[159,213,214,219],{"__ignoreMap":182},[186,215,216],{"class":188,"line":189},[186,217,218],{},"LARACLAW_TELEGRAM_ENABLED=true\n",[186,220,222],{"class":188,"line":221},2,[186,223,224],{},"LARACLAW_TELEGRAM_TOKEN=...\n",[149,226,227,228,231],{},"It also creates a ",[159,229,230],{},"laraclaw_accounts"," row mapping your chat ID to the owner user.",[145,233,235],{"id":234},"registering-the-webhook","Registering the Webhook",[149,237,238,239,242,243,246],{},"Laraclaw exposes the webhook at ",[159,240,241],{},"POST \u002Ftelegram\u002Fwebhook",". Register it with Telegram by sending a ",[159,244,245],{},"setWebhook"," request:",[177,248,250],{"className":179,"code":249,"language":181,"meta":182,"style":182},"curl -X POST \"https:\u002F\u002Fapi.telegram.org\u002Fbot{TOKEN}\u002FsetWebhook\" \\\n  -d \"url=https:\u002F\u002Fyour-app.com\u002Ftelegram\u002Fwebhook\"\n",[159,251,252,277],{"__ignoreMap":182},[186,253,254,257,260,263,267,270,273],{"class":188,"line":189},[186,255,256],{"class":192},"curl",[186,258,259],{"class":196}," -X",[186,261,262],{"class":196}," POST",[186,264,266],{"class":265},"sMK4o"," \"",[186,268,269],{"class":196},"https:\u002F\u002Fapi.telegram.org\u002Fbot{TOKEN}\u002FsetWebhook",[186,271,272],{"class":265},"\"",[186,274,276],{"class":275},"sTEyZ"," \\\n",[186,278,279,282,284,287],{"class":188,"line":221},[186,280,281],{"class":196},"  -d",[186,283,266],{"class":265},[186,285,286],{"class":196},"url=https:\u002F\u002Fyour-app.com\u002Ftelegram\u002Fwebhook",[186,288,289],{"class":265},"\"\n",[149,291,292,293,296],{},"You may also do this from ",[159,294,295],{},"php artisan tinker",":",[177,298,301],{"className":299,"code":300,"language":193,"meta":182,"style":182},"language-php shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","Telegram::setWebhook(['url' => 'https:\u002F\u002Fyour-app.com\u002Ftelegram\u002Fwebhook']);\n",[159,302,303],{"__ignoreMap":182},[186,304,305],{"class":188,"line":189},[186,306,300],{},[145,308,310],{"id":309},"webhook-authentication","Webhook Authentication",[149,312,313,314,318,319,321],{},"Laraclaw does ",[315,316,317],"strong",{},"not"," verify a Telegram secret token on inbound webhook requests. Authentication is identity-based: every incoming chat ID is checked against ",[159,320,230],{}," for DMs, and group messages are accepted on the assumption that whoever added the bot to the group is the owner.",[149,323,324],{},"This means anyone who guesses or learns your webhook URL can hit it with a forged update. The validation that follows will silently drop messages from unknown chat IDs, but the URL itself is unauthenticated.",[149,326,327],{},"If your install is exposed to the public internet, mitigate this by:",[329,330,331,339,342],"ul",{},[332,333,334,335,338],"li",{},"Picking an unguessable URL path for the webhook (Telegram does not require ",[159,336,337],{},"\u002Ftelegram\u002Fwebhook"," — you can route the package controller anywhere).",[332,340,341],{},"Restricting the route at the load balancer or WAF to Telegram's published IP ranges.",[332,343,344,345,347,348,351,352,355],{},"Using ",[159,346,245],{},"'s ",[159,349,350],{},"secret_token"," parameter and adding your own middleware that checks the ",[159,353,354],{},"X-Telegram-Bot-Api-Secret-Token"," header.",[145,357,359],{"id":358},"direct-messages","Direct Messages",[149,361,362],{},"Direct messages have a positive chat ID. Only the registered owner may DM the bot. Messages from any other account are dropped during validation.",[149,364,365],{},"Each DM is one persistent conversation, keyed by the chat ID.",[145,367,369],{"id":368},"groups","Groups",[149,371,372],{},"Group chats have a negative chat ID. The bot responds to anyone in the group, but tools always run as the owner regardless of who sent the message.",[149,374,375],{},"Each group is one persistent conversation, keyed by the group's chat ID.",[145,377,60],{"id":378},"attachments",[149,380,381,382,385,386,389],{},"Inbound photos, voice notes, and documents are downloaded to ",[159,383,384],{},"inbound\u002F{message_uuid}\u002F"," on the attachments disk. Voice messages are transcribed by the global ",[159,387,388],{},"TranscribeAudio"," agent middleware before the agent sees the message.",[149,391,392],{},"Outbound files are sent as the appropriate Telegram type:",[329,394,395,401,407],{},[332,396,397,398],{},"Audio → ",[159,399,400],{},"sendVoice",[332,402,403,404],{},"Images → ",[159,405,406],{},"sendPhoto",[332,408,409,410],{},"Everything else → ",[159,411,412],{},"sendDocument",[145,414,416],{"id":415},"confirmation-flow","Confirmation Flow",[149,418,419],{},"When a tool requires confirmation, the agent asks yes\u002Fno in chat. The pending confirmation is stored in Redis. The next inbound message on that thread is parsed as the answer, and the tool either runs or is cancelled.",[421,422,423],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}",{"title":182,"searchDepth":221,"depth":221,"links":425},[426,427,428,429,430,431,432,433],{"id":147,"depth":221,"text":5},{"id":165,"depth":221,"text":166},{"id":234,"depth":221,"text":235},{"id":309,"depth":221,"text":310},{"id":358,"depth":221,"text":359},{"id":368,"depth":221,"text":369},{"id":378,"depth":221,"text":60},{"id":415,"depth":221,"text":416},"Wire Laraclaw up to a Telegram bot for direct messages and group chats.","md",null,{},true,{"title":39,"description":434},"W7WWBkKx2f9ul3Lw6qoWLInhptKJSxNcKDZGkyxowoo",[442,444],{"title":29,"path":30,"stem":31,"description":443,"children":-1},"Install Laraclaw, publish its config, and walk through the setup wizard.",{"title":43,"path":44,"stem":45,"description":445,"children":-1},"Connect Laraclaw to a Slack workspace for DMs and threaded channel conversations.",1786661906119]