- Create a new Telegram bot:
- start a chat with BotFather;
- type
/newbot
, select a name (to be shown in chats) and handle for your bot; - note the bot token to access HTTP API - a long string with a colon in the middle (later referred to as
<token>
); - optionally
/setdescription
and/setuserpic
.
- Add the bot to the chat/channel and note its id:
- add the bot to a new or existing chat or group - this is where your bot will send notifications to;
- go to
https://api.telegram.org/bot<token>/getUpdates
(replace<token>
with your token); - within the
chat
part, find and note theid
field - a positive or negative number (later referred to as<chat_id>
).
- Programmatically send notifications:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"last_updated": "2019-03-20T17:00:25.902Z", | |
"scores":[ | |
{ | |
"score": 100000000, | |
"alias": "LightningPowerUsers", | |
"public_key": "0331f80652fb840239df8dc99205792bba2e559a05469915804c08420230e23c7c" | |
}, | |
{ | |
"score": 100000000, |