1
votes

I try produced my telegram bot with passport function. https://core.telegram.org/passport

I produced my private key and public key. I don't understand where I must write the /setpublickey command.

In the section documentation, I can't find the command. https://core.telegram.org/bots#botfather-commands

Can you explain to me? Where must I write /setpublickey command?

1

1 Answers

1
votes

You have to write /setpublickey in the telegram chat of "BotFather" (it does not appear in the list of commands). You will get a list with the bots that you have associated with your telegram account. When selecting a bot it will tell you what you have to write in the terminal to generate the private and public key.

Private key:

openssl genrsa 2048 > private.key

Public key:

openssl rsa -in private.key -pubout

Now you just have to copy the public key of the terminal, from ----- BEGIN PUBLIC KEY ----- to ----- END PUBLIC KEY ----- (included) and paste it in the "BotFather" chat.