Skip to content

Commit

Permalink
[telegram] Update README.md (openhab#10948)
Browse files Browse the repository at this point in the history
Add design of token for better understanding
  • Loading branch information
Wikibear committed Jul 6, 2021
1 parent 611f475 commit 930431d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bundles/org.openhab.binding.telegram/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ As described in the Telegram Bot API (https://core.telegram.org/bots#6-botfather

- On a Telegram client open a chat with BotFather.
- Send `/newbot` to BotFather and fill in all the needed information. The authentication token that is given will be needed in the next steps.
- The token is a combination with double point separated parts of numbers and letters e.g.: 158642643:ABCHL_O-MUovQ1NzrDF5R_nqLbFhPPrg9Jps

2. Create the destination chat

- Open a chat with your new Bot and send any message to it. The next step will not work unless you send a message to your bot first.

3. Get the chatID

- Open a browser and invoke `https://api.telegram.org/bot<token>/getUpdates` (where `<token>` is the authentication token previously obtained)
- Open a browser and invoke `https://api.telegram.org/bot<token>/getUpdates` (where `<token>` is the authentication token previously obtained e.g.: `https://api.telegram.org/bot158642643:ABCHL_O-MUovQ1NzrDF5R_nqLbFhPPrg9Jps/getUpdates`)
- Look at the JSON result to find the value of `id`: that's the chatID.

Note that if using a Telegram group chat, the group chatIDs are prefixed with a dash that must be included in the config (e.g. `-22334455`).
Expand Down

0 comments on commit 930431d

Please sign in to comment.