-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Create a bot that can post to a channel.
You can try all this by hand and later write code for it:
Creating a bot works with talking to https://t.me/botfather (doc) until you have a token.
To test the token open this url https://api.telegram.org/bot<token>/getMe (doc). (insert token instead of <token>).
Use your own account to talk to your bot and then use https://telegram.me/userinfobot (doc) to get the id of your use name.
To make the bot write to you back call https://api.telegram.org/bot<token>/sendMessage?chat_id=<chat_id>&text=<text> (doc), replace <chat_id> with your user id and <text> with some message you want to send.
As soon as this works you can post to public channels, to get the id see https://github.com/GabrielRF/telegram-id#web-group-id or https://github.com/GabrielRF/telegram-id#web-channel-id .