Configuration of sending messages via Telegram

It is need to make the following settings for successful sending of messages by the OTPsender module via Telegram:

  1. Log in using link using your phone number:

    ../../_images/telegram_setting1.png

    Telegram authorization

    Note

    Phone number will only be used to create the application and generate necessary data for mailing.

  2. Follow the link API Development tools:

    ../../_images/telegram_setting2.png

    Following to development tools

  3. In the new application creation window that opens, fill in the two main fields App title and Short name. The rest of fields are optional for filling:

    ../../_images/telegram_setting3.png

    New application creation

  4. Then press the button Create application.

  5. Copy App api_id and App api_hash parameter values from opened window into the appropriate fields api_id and api_hash of OTPsender config file.

  6. To bind the number from which the verification codes will be sent, run the command on the node where OTPsender is installed:

    otp-sender-manage init-tg-session
    
  7. Enter needed phone number in the format +7 (###) ### ## ##.

  8. As a result of the program’s operation, a session identifier will be generated, which must be copied into the field session of OTPsender config file.

  9. Restart module services:

    systemctl restart aos-otp-sender-api.service aos-otp-sender-worker.service