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:
Log in using link using your phone number:
Note
Phone number will only be used to create the application and generate necessary data for mailing.
Follow the link API Development tools:
In the new application creation window that opens, fill in the two main fields
App title
andShort name
. The rest of fields are optional for filling:Then press the button
Create application
.Copy
App api_id
andApp api_hash
parameter values from opened window into the appropriate fieldsapi_id
andapi_hash
of OTPsender config file.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
Enter needed phone number in the format
+7 (###) ### ## ##
.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.Restart module services:
systemctl restart aos-otp-sender-api.service aos-otp-sender-worker.service