Используем Telegram канал в качестве системы оповещения
@BotFather
#POST: https://api.telegram.org/bot<token>/sendMessage
{
"chat_id": "@mysuperchannel",
"text": "hello!!!"
}
В ответ получам
{
"ok": true,
"result": {
"message_id": 10,
"chat": {
"id": -2222222222222,
"title": "mysuperchannel",
"username": "mysuperchannel",
"type": "channel"
},
"date": 1520000117,
"text": "hello!!!"
}
}
result.chat.id
из тестового ответа#POST: https://api.telegram.org/bot<token>/sendMessage
{
"chat_id": "-2222222222222",
"text": "hola !!!"
}