1. Create a bot token through @botfather.
1.1 Install Telegram
1.2 Login to telegram
1.3 on Search window type @botfather and select
1.4 type one by one until you see Done !, Congratulations , your token
/start
/newbot
drvautobot (username)
Done !, ...
token 123456:dsfd..
2. Copy this token and keep it.
3. Open telegram and create new channel.
Ex: autobot
3.1 open autobot channel window
3.2 click on top to see administrators , click
3.3 search @drvautobot (bot username), select
3.4 assign as administrator
Thats it.
Now use browser or programing with GET method.
browser
https://api.telegram.org/bot /sendMessage?chat_id=@ &text=hello
ex: https://api.telegram.org/bot123456:dsfdadsfsdfdsfahgjhgsfd/sendMessage?chat_id=@autobot&text=hello
response
open your channel window and see the text hello.
Enjoy
1.1 Install Telegram
1.2 Login to telegram
1.3 on Search window type @botfather and select
1.4 type one by one until you see Done !, Congratulations , your token
/start
/newbot
drvautobot (username)
Done !, ...
token 123456:dsfd..
2. Copy this token and keep it.
3. Open telegram and create new channel.
Ex: autobot
3.1 open autobot channel window
3.2 click on top to see administrators , click
3.3 search @drvautobot (bot username), select
3.4 assign as administrator
Thats it.
Now use browser or programing with GET method.
browser
https://api.telegram.org/bot
ex: https://api.telegram.org/bot123456:dsfdadsfsdfdsfahgjhgsfd/sendMessage?chat_id=@autobot&text=hello
response
{"ok":true,"result":{"message_id":2,"chat":{"id":-1001493064021,"title":"Autobot","username":"infovijay","type":"channel"},"date":1566909775,"text":"hello"}}
open your channel window and see the text hello.
Enjoy
No comments:
Post a Comment