Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

publicKey has invalid format #8

Open
ysavr opened this issue Dec 13, 2022 · 1 comment
Open

publicKey has invalid format #8

ysavr opened this issue Dec 13, 2022 · 1 comment

Comments

@ysavr
Copy link

ysavr commented Dec 13, 2022

java.lang.IllegalArgumentException: publicKey has invalid format

i got generated public key from https://my.telegram.org/apps
and i using bot id from https://api.telegram.org/bot/getUpdates

@bgrebennikov
Copy link

bgrebennikov commented May 18, 2023

You need to send /setpublickey command to BotFather
and generate private key using openssl from command line
openssl genrsa 2048 > private.key

After that, get public from generated PK
openssl rsa -in private.key -pubout

and send printed result to botFather

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants