DEV Community

Discussion on: Guide on How to Create and Deploy a Telegram Bot

Collapse
 
plasmadray profile image
Noah Alorwu

How do I connect the script to the bot? I created var token and assigned my api token but nothing seems to work.

Collapse
 
djangostars profile image
Django Stars

I) Please make sure that you get your own token from botfather telegram bot
1)Open @BotFather bot in telegram
2)Enter command : /mybots
3)Choose a bot from the list below
4) click to API Token button
5) Now you see your token which is highlighted in green

II) Check in your browser that your token is correct and you have access for it
1) open browser and go to api.telegram.org/bot/getUpdates
as for example:
your token is 10050000:aaabbbccc_____dddd
your should open
api.telegram.org/bot10050000:aaabb...

2) if you see the message without exemptions it should work for your script too