As I need to send message on user's whatsapp number so I have downloaded WhatsApp API from nuget packages. and also I implemented code according to that. But after so many search I found that I need to register mobile number to get password...using WART but I think this application is not working and not able to get password from WhatsApp.
So if anyone implement this feature of sending message on whatsapp number in Asp.net c# then please update me how to do this using WhatsApp Api.. even I don't know whatsapp is provide any API or not.
I have tried with below code...but I need password before that..
string fromMob = "919xxxxxxxxx";
string toMob = txtMobileNo.Text.Trim();
string msg = "This is first WhatsApp Message Whatsapp API";
WhatsApp wa = new WhatsApp(fromMob, "RequiredPassword", "SD", false, false);
try
{
wa.OnConnectSuccess += () =>
{
wa.OnLoginSuccess += (phoneNumber, data) =>
{
wa.SendMessage(toMob, msg);
};
wa.OnLoginFailed += (data) =>
{
msg = "Login Failed" + data;
};
};
wa.OnConnectFailed += (ex) =>
{
msg = "Connection Failed" + ex;
};
wa.Connect();
}
catch { }