[{"data":1,"prerenderedAt":299},["ShallowReactive",2],{"docs-page-\u002Fdocs\u002Fb418-tg-cf7\u002Fbots-and-chats":3,"docs-navigation":264},{"id":4,"title":5,"body":6,"description":256,"extension":257,"meta":258,"navigation":259,"path":260,"seo":261,"stem":262,"__hash__":263},"docs\u002Fdocs\u002Fb418-tg-cf7\u002F2.bots-and-chats.md","Bots & chats",{"type":7,"value":8,"toc":241},"minimark",[9,13,23,28,33,68,72,83,90,103,107,110,174,178,181,198,201,205,212,216,230,234],[10,11,5],"h1",{"id":12},"bots-chats",[14,15,16,17,22],"p",{},"Bots send your notifications; chats receive them. You can add any number of both and mix them freely in ",[18,19,21],"a",{"href":20},"\u002Fdocs\u002Fb418-tg-cf7\u002Fconnections","connections",".",[24,25,27],"h2",{"id":26},"bots","Bots",[29,30,32],"h3",{"id":31},"creating-a-bot","Creating a bot",[34,35,36,46,57],"ol",{},[37,38,39,40,22],"li",{},"In Telegram, open a chat with ",[18,41,45],{"href":42,"rel":43},"https:\u002F\u002Ft.me\u002FBotFather",[44],"nofollow","@BotFather",[37,47,48,49,53,54,22],{},"Send ",[50,51,52],"code",{},"\u002Fnewbot"," and follow the prompts: pick a display name, then a username ending in ",[50,55,56],{},"bot",[37,58,59,60,64,65,22],{},"BotFather replies with a ",[61,62,63],"strong",{},"token"," that looks like ",[50,66,67],{},"123456789:AAExampleTokenString",[29,69,71],{"id":70},"adding-the-bot-to-the-plugin","Adding the bot to the plugin",[14,73,74,75,78,79,82],{},"In ",[61,76,77],{},"CF7 Telegram → Bots & Chats",", click ",[61,80,81],{},"Add bot",", give it a label, and paste the token. The token is validated against the Telegram API on save and the bot's profile is fetched — if the token is wrong, you'll know right away.",[14,84,85,86,89],{},"You can add ",[61,87,88],{},"multiple bots"," — useful when different sites, brands, or teams should message from different senders.",[91,92,93],"blockquote",{},[14,94,95,98,99,102],{},[61,96,97],{},"Keep tokens secret."," Anyone with the token can send messages as your bot. If a token leaks, revoke it with BotFather (",[50,100,101],{},"\u002Frevoke",") and save the new one in the plugin.",[24,104,106],{"id":105},"chats","Chats",[14,108,109],{},"A chat is anywhere the bot can deliver a message:",[111,112,113,126],"table",{},[114,115,116],"thead",{},[117,118,119,123],"tr",{},[120,121,122],"th",{},"Type",[120,124,125],{},"Notes",[127,128,129,142,150,162],"tbody",{},[117,130,131,135],{},[132,133,134],"td",{},"Private chat",[132,136,137,138,141],{},"Start a chat with your bot and press ",[61,139,140],{},"Start"," first — bots can't message you before that.",[117,143,144,147],{},[132,145,146],{},"Group \u002F supergroup",[132,148,149],{},"Add the bot as a member.",[117,151,152,155],{},[132,153,154],{},"Supergroup topic (thread)",[132,156,157,158,161],{},"Add the bot to the supergroup, then set the optional ",[61,159,160],{},"thread ID"," on the chat so messages land in that specific topic.",[117,163,164,167],{},[132,165,166],{},"Channel",[132,168,169,170,173],{},"Add the bot as an ",[61,171,172],{},"administrator"," with permission to post.",[29,175,177],{"id":176},"detecting-chat-ids","Detecting chat IDs",[14,179,180],{},"You don't need to hunt for chat IDs manually:",[34,182,183,186,195],{},[37,184,185],{},"Add the bot to the target chat (or message it directly for a private chat) and send any message there.",[37,187,74,188,78,191,194],{},[61,189,190],{},"Bots & Chats",[61,192,193],{},"Detect chats"," and pick the bot.",[37,196,197],{},"The plugin lists every chat the bot has recently seen — pick the right one and it's saved with the correct ID.",[14,199,200],{},"If detection doesn't show your chat, send a fresh message in that chat and detect again — Telegram only exposes recent updates.",[29,202,204],{"id":203},"entering-a-chat-id-manually","Entering a chat ID manually",[14,206,207,208,211],{},"If you already know the ID, you can enter it directly. Group and channel IDs are negative numbers (channels\u002Fsupergroups usually start with ",[50,209,210],{},"-100","), private chat IDs are positive.",[29,213,215],{"id":214},"supergroup-topics","Supergroup topics",[14,217,218,219,221,222,225,226,229],{},"For forums (supergroups with topics enabled), set the ",[61,220,160],{}," on the chat. Each topic has its own thread ID — the easiest way to get it is from a topic message link: in ",[50,223,224],{},"https:\u002F\u002Ft.me\u002Fc\u002F1234567890\u002F45\u002F123",", the middle number (",[50,227,228],{},"45",") is the thread ID.",[24,231,233],{"id":232},"testing","Testing",[14,235,236,237,240],{},"Every chat row has a ",[61,238,239],{},"Send test"," action that delivers a test message immediately — use it to confirm the bot has access before wiring up a connection.",{"title":242,"searchDepth":243,"depth":243,"links":244},"",2,[245,250,255],{"id":26,"depth":243,"text":27,"children":246},[247,249],{"id":31,"depth":248,"text":32},3,{"id":70,"depth":248,"text":71},{"id":105,"depth":243,"text":106,"children":251},[252,253,254],{"id":176,"depth":248,"text":177},{"id":203,"depth":248,"text":204},{"id":214,"depth":248,"text":215},{"id":232,"depth":243,"text":233},"Create Telegram bots with BotFather, detect chat IDs automatically, and configure groups, channels, and supergroup topics.","md",{},true,"\u002Fdocs\u002Fb418-tg-cf7\u002Fbots-and-chats",{"title":5,"description":256},"docs\u002Fb418-tg-cf7\u002F2.bots-and-chats","CywibOx7WsM1SapHidfScjE7DlD7CAk6LHq0XEwwMG0",[265],{"title":266,"path":267,"stem":268,"children":269},"Docs","\u002Fdocs","docs",[270,273],{"title":271,"path":267,"stem":272},"Overview","docs\u002Findex",{"title":274,"path":275,"stem":276,"children":277,"page":298},"Telegram for CF7","\u002Fdocs\u002Fb418-tg-cf7","docs\u002Fb418-tg-cf7",[278,282,283,286,290,294],{"title":279,"path":280,"stem":281},"Getting started","\u002Fdocs\u002Fb418-tg-cf7\u002Fgetting-started","docs\u002Fb418-tg-cf7\u002F1.getting-started",{"title":5,"path":260,"stem":262},{"title":284,"path":20,"stem":285},"Connections & routing","docs\u002Fb418-tg-cf7\u002F3.connections",{"title":287,"path":288,"stem":289},"Message templates","\u002Fdocs\u002Fb418-tg-cf7\u002Fmessage-templates","docs\u002Fb418-tg-cf7\u002F4.message-templates",{"title":291,"path":292,"stem":293},"Developer hooks","\u002Fdocs\u002Fb418-tg-cf7\u002Fhooks","docs\u002Fb418-tg-cf7\u002F5.hooks",{"title":295,"path":296,"stem":297},"FAQ & troubleshooting","\u002Fdocs\u002Fb418-tg-cf7\u002Ffaq","docs\u002Fb418-tg-cf7\u002F6.faq",false,1784301861413]