Personal tools

Difference between revisions of "Telegram"

From PhotoVoltaic Logger new generation

Jump to: navigation, search
(Created page with "Category:Scripts # Script to send status messages to a telegram chat == Installation == Location: [https://github.com/KKoPV/PVLng-scripts/tree/master/bin Scripts reposit...")
(No difference)

Revision as of 13:48, 11 September 2020

  1. Script to send status messages to a telegram chat

Installation

Location: Scripts repository

https://core.telegram.org/bots#botfather

   /newbot

Remember the token given by @BotFather!

    1. Send 1st a test message to your bot via client or web.

This is needed to find out the chat id afterwards with

   $ curl -X POST https://api.telegram.org/bot<token>/getUpdates
    1. Find and remember the chat id like this:
   {"ok":true,"result":..."chat":{"id":1234567890,...
    1. Usage
   $ ./telegram.sh token chat message ...
   $ ./telegram.sh token chat @filename
      1. References

- https://core.telegram.org/bots - https://core.telegram.org/bots/api - https://core.telegram.org/bots/samples