Merge pull request #203 from rubinlinux/patch-1

There is an easier way to obtain your chat_id
This commit is contained in:
John Reese 2016-08-19 17:30:55 -04:00 committed by GitHub
commit d5908dc7a0
1 changed files with 5 additions and 3 deletions

View File

@ -7,9 +7,11 @@ module by following the above steps.
* First of all, you need to have a telegram account. * First of all, you need to have a telegram account.
* Talk to [BotFather][] to create a new bot and get an api key. * Talk to [BotFather][] to create a new bot and get an api key.
* Create a chat with the bot and say something in the chat. * Create a chat with the bot and say something in the chat.
* Obtain your chat_id (a numeric id # used internally) one of two ways
* Use browser to connect to https://api.telegram.org/bot[apikey]/getUpdates (replace the apikey with * Use browser to connect to https://api.telegram.org/bot[apikey]/getUpdates (replace the apikey with
the key generated by BotFather). You should see messages sent from you, and there will be several the key generated by BotFather). You should see messages sent from you, and there will be several
id fields in the reply. We'll use the one in the chat session. id fields in the reply. We'll use the one in the chat session.
* Chat with @get_id, and send it the command /my_id. It will respond with your chat_id
* set service to 'telegram': <code>/msg *push set service telegram</code> * set service to 'telegram': <code>/msg *push set service telegram</code>
* set secret to the **api key**: <code>/msg *push set secret your-api-key</code> * set secret to the **api key**: <code>/msg *push set secret your-api-key</code>
* set target to chat ID: <code>/msg *push set target your-chat-id</code> * set target to chat ID: <code>/msg *push set target your-chat-id</code>