I am using WTelegramClient library with ASP.NET MVC project, to access Telegram API.
Using this code, works good, until verification code received on App.
I am figuring out, how do I enter this code and where in my view page, when initial code is already run with partial configuration details.
Can anyone help me with this?
WTelegram.Client client;
public async Task<ActionResult> Index()
{
string Config(string what)
{
switch (what)
{
case "api_id": return "XXX";
case "api_hash": return "XXXXXX";
case "phone_number": return "+NUMBER";
default: return null;
}
}
client = new WTelegram.Client(Config);
await client.LoginUserIfNeeded();
return View();
}
When above code is run at start with http://localhost:PORT_NUMBER/Home
, code runs fine and Telegram sends me a CODE, but now how and where to enter that code, I am not getting idea on this.