whatsapp c#使用WhatsAppApi验证响应错误

whatsapp c#使用WhatsAppApi验证响应错误,c#,whatsapp,whatsapi,C#,Whatsapp,Whatsapi,我需要连接什么应用程序消息,但 我发现错误很难判断 string from = "+965********"; //( ) string to = txt_To.Text; // Mobile Number(+2011104******) string msg = txt_Message.Text; WhatsAppApi.WhatsApp wa = new WhatsAppApi.WhatsApp(from, "1RTy*************

我需要连接什么应用程序消息,但
我发现错误很难判断

string from = "+965********"; //( )
        string to = txt_To.Text; // Mobile Number(+2011104******)
        string msg = txt_Message.Text;
        WhatsAppApi.WhatsApp wa = new WhatsAppApi.WhatsApp(from, "1RTy***************=", "yahia", false, false);
            wa.OnConnectSuccess += () =>
                {

                    MessageBox.Show("Connected to WhatsApp...");
                    wa.OnLoginSuccess += (phonenumber, data) =>
                    {
                        wa.SendMessage(to, msg);
                        MessageBox.Show("Message Sent...");
                    };
                    wa.OnLoginFailed += (data) =>
                    {
                        MessageBox.Show("Login Failed : {0} : ", data);
                    };
                    try
                    {
                        wa.Login();
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(ex.Message);
                    }
                };


            wa.OnConnectFailed += (ex) =>
            {
                MessageBox.Show("Connection Failed...");
            };
            wa.Connect();
        }

我试着用带国家代码和不带国家代码的手机号码。但是没有响应

返回了什么异常消息?消息==>auth response Error此时代码中是否出现异常。。?MessageBox.Show(例如Message);是的,在catch(Exception ex){MessageBox.Show(ex.Message);}WhatsApp已经做了一些更改,以防止人们使用API自动化请求。这违反了他们的策略,他们可以禁止您的WhatsApp帐户。我在GitHut存储库中找到了这个