Click here to Skip to main content
15,742,609 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to send message to WhatsApp using my dotnet application and i am trying to send it this way as i have coded, but to send the message we need to register the from/senders number on WART.

But while registering the number it is getting failed to register,showing old resaon "old version".

I think now no longer this method of registration is working.

can any one tell me:
1) The alternative for WART.

or

2) Any other working method to send message to any WhatsApp number through Dot Net application and c#

What I have tried:

C#
protected void Unnamed4_Click(object sender, EventArgs e)
        {
            string from = "91**********";
            string to = tonumber.Text;
            string msg = message.Text;

            WhatsAppApi.WhatsApp wa = new WhatsAppApi.WhatsApp(from, "S2pRzjF5WnVc***********", "namofsender", false, false);

            wa.OnConnectSuccess += () =>
            {
                message.Text = "success";

                wa.OnLoginSuccess += (phonenumber, data) =>
                  {
                      wa.SendMessage(to, msg);
                      message.Text = "Sent";
                  };


                wa.OnLoginFailed += (data) =>
                  {
                      message.Text = "Failed";
                  };

                wa.Login();
            };

            wa.OnConnectFailed += (ex) =>
              {
                  message.Text = "connection failed";
              };

            wa.Connect();
        }
Posted
Updated 10-May-22 9:01am
v2

1 solution

 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900