Save the API key somewhere you will need to put it in nextcloud along with your bot username in the social login section.
Add your bot username and change the authorization type to “Redirect to URL”
Enter your nextcloud domain followed by:
Login with Telegram
Go back to BotFather
Select your bot
Go to your nextcloud settings social login admin page.
Enter your Telegram bot name
and your API key that you copied when you created your bot
And that’s it