本文介绍了发送带有whatsapi.net消息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要发使用whatsapi消息,这是我尝试

 字符串昵称=测试; 
串发件人=XXXXXXXXXXXXXX;
//我的电话号码与tryed 049xxxxxxxxxxxx,0049xxxxxxxxxxxxxx,49xxxxxxxxxxxxxxx,XXXXXXXXXXXXXX
IMEI串=xxxxxxxxxxxxxxxxxxxxxxxxx; //我的IMEI
我的WhatsApp =新的WhatsApp(发件人,IMEI,昵称,真实);
me.Connect();
Console.WriteLine(me.ConnectionStatus); //我得到一个连接!
到Console.ReadLine();
me.SendMessage(XXXXXXXXXX,这是一个测试!); //发送短消息
//没有收到消息:(
me.Disconnect();
Console.WriteLine(me.ConnectionStatus);
到Console.ReadLine();

现在在哪里是我的错误,我如何做是正确的。



我使用这个版本:?HTTPS:的。



首先,我只是想发送消息。
当我尝试得到疣体的要求,我只是得到这个消息:

 使用SMS还是无法请求代码的声音
短信:{身份:不及格,原因:无路线,retry_after:3600}
声音:{身份:不及格,原因:无路线 retry_after:3600}


解决方案

  WhatsApp的WA =新的WhatsApp(你的号码,密码,的Pankaj,假的,假的); 
wa.OnConnectSuccess + =()=>
$ { b $ b的Response.Write(连接);
wa.OnLoginSuccess + =(PHNO,数据)=>
{
wa.SendMessage(来,味精);
};

wa.OnLoginFailed + =(数据)=>
{
的Response.Write(登录失败+数据);
};
wa.Login();
};
wa.OnConnectFailed + =(前)=>
{
的Response.Write(连接失败);
}


I want to send messages using whatsapi and this was my try

string nickname = "Test";
string sender = "xxxxxxxxxxxxxx";         
//My Phone Number tryed with 049xxxxxxxxxxxx, 0049xxxxxxxxxxxxxx, 49xxxxxxxxxxxxxxx, xxxxxxxxxxxxxx
string imei = "xxxxxxxxxxxxxxxxxxxxxxxxx";//My IMEI 
WhatsApp me = new WhatsApp(sender,imei ,nickname,true);
me.Connect();
Console.WriteLine(me.ConnectionStatus);// I get a Connection!
Console.ReadLine();
me.SendMessage("xxxxxxxxxx", "This is a Test!");// Send Message
//No Message received :(
me.Disconnect();
Console.WriteLine(me.ConnectionStatus);
Console.ReadLine();

Now where is my mistake? and how I'm doing it right?

I'm using this version: https://github.com/perezdidac/WhatsAPINet.

First I just want to send messages.When I try to get a request from the WART, I just get this message:

Could not request code using either sms or voice.
SMS: {"status":"fail","reason":"no routes","retry_after": 3600}
Voice: {"status":"fail","reason":"no routes","retry_after": 3600}
解决方案
    WhatsApp wa = new WhatsApp("your number", "your password", "pankaj", false, false);
    wa.OnConnectSuccess += () =>
    {
        Response.Write("connect");
        wa.OnLoginSuccess += (phno,data) =>
        {
            wa.SendMessage("to", "msg");
        };

        wa.OnLoginFailed += (data) =>
        {
            Response.Write("login failed"+data);
        };
        wa.Login();
    };
    wa.OnConnectFailed+= (ex)=>
    {
        Response.Write("connection failed");
    }

这篇关于发送带有whatsapi.net消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-02 11:53