'Telegram login widget return "bot domain invalid" in my mvc app

I use telegram login widget in MVC App , and follow steps as in post telegram-web-login-widget-setdomain-does-not-work

Steps As in Post

Here is how the dialog goes, and how you need to respond to Botfather:

Me:

/setdomain

Botfather:

Choose a bot to set or change its linked domain. See Login Widget documentation for details: https://core.telegram.org/widgets/login

Me:

@thenameofthe_bot

BotFather:

Link your website with your bot to use the Telegram Login Widget. Widget > documentation: https://core.telegram.org/widgets/login Use /empty to remove.

Me:

https://www.thenameofmysite.com/

BotFather:

Success! Domain updated. /help

But it still renders "Bot domain invalid" instead of telegram login button.



Solution 1:[1]

  1. You have to create a telegram bot

  2. and give the username of the bot, on the https://core.telegram.org/widgets/login page.

3)Then telegram will create a JS code for you. Place it wherever you want it in the HTML file.

  1. then send /setdomain command to BotFather(@BotFather).

  2. then select your bot

  3. then send your domain. Eg:- edupara.lk

(Telegram Widget only works with HTTPS)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Паван Викаситха