-
Notifications
You must be signed in to change notification settings - Fork 0
Home
yurenchen000 edited this page Oct 21, 2024
·
4 revisions
Welcome to the disk_notify wiki!
how to get bot_token and chat_id?
-
create your bot & get
bot_token
https://core.telegram.org/bots#how-do-i-create-a-bot
@BotFather will send you bot_token like this:
4839574812:AAFD39kkdpWt3ywyRZergyOLMaJhac60qc -
send a msg from your telegram to bot
// say hello to bot, so that bot can discover your chat -
get
chat_id
via http api
https://core.telegram.org/bots/api#getupdates
BOT_TOKEN='put your bot token'
curl -s "https://api.telegram.org/bot$BOT_TOKEN/getUpdates" | jq
pick the .chat.id from result json