当我尝试连接到Telegram API发送消息和文件时遇到问题 但这给了我这个问题'AUTH_KEY_UNlocated'
当我尝试制作 SendCodeRequestAsync()时,它说我必须等待4个小时才能再次连接,但是当我进行搜索时,我发现虽然我被授权可以不需要它使用我的应用程序 client.IsUserAuthorized()
但是当我尝试等待 client.GetContactsAsync(); 时,它给出了先前的错误
var store = new FileSessionStore();
client = new TelegramClient(My_API_ID, "MY_KEY", store,
"session");
await client.ConnectAsync();
var isregestered = await
client.IsPhoneRegisteredAsync(sendingnumber.Text);
if (isregestered)
{
if (!client.IsUserAuthorized())
{
hash = await client.SendCodeRequestAsync(sendingnumber.Text);
}
else
{
hash = client.GetHashCode().ToString();
}
var result = await client.GetContactsAsync();