本文介绍了whatsapp c# Auth 响应错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
限时送ChatGPT账号..我正在为 whatsapp 使用最新的 nuget 版本:WhastApp API 1.2.2 并阅读有关在我的应用程序中配置我的 whatsapp 的教程.我正在使用我的本地主机进行测试,我的代码是:
I'm using the last nuget version for whatsapp: WhastApp API 1.2.2 and reading tutorials about configure my whatsapp in my application. I'm using my localhost to test and my code is:
string from = "503XXXX";
string to = "503XXXX";
string msg = "lorem ipsum";
WhatsApp wa = new WhatsApp(from, "jd8eY3FXXXXXXXXXXXXXXXXXXX", "MrMins", true);
wa.OnConnectSuccess += () =>
{
wa.OnLoginSuccess += (phoneNumber, data) =>
{
wa.SendMessage(to, msg);
};
};
wa.OnLoginFailed += (data) =>
{
//Fail message
};
wa.Login();
wa.OnConnectFailed += (ex) =>
{
//ConnectionFailed
};
wa.Connect();
wa.SendMessage(to, msg);
wa.Disconnect();
我收到错误:
Auth response error
我使用 WART 更新了我的 whatsapp 密码,并从我的 whatsapp 手机中注销(我认为是正确的行为),但仍然无法正常工作.
I updated my whatsapp password with WART and logged me out from my whatsapp mobile (I think is the correct behavior), but is still not working.
我的代码有什么问题?
推荐答案
想象一下,你的代码区是:503,你的电话号码是555555555555
Imagine, your code area is: 503 and your phone number is 555555555555
WhatsApp wa = new WhatsApp("503555555555555", "get the password using WART", "your nickname", false, false);
wa.OnConnectSuccess += () =>
{
Response.Write("connect");
wa.OnLoginSuccess += (phno,data) =>
{
wa.SendMessage("Destinatino number (50377777777777)", "Youre custom message");
};
wa.OnLoginFailed += (data) =>
{
Response.Write("login failed"+data);
};
wa.Login();
};
wa.OnConnectFailed += (ex) =>
{
Response.Write("connection failed");
}
;
wa.Connect();
这篇关于whatsapp c# Auth 响应错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
更多推荐
[db:关键词]
发布评论