Subscribe and Follow

    How to WhatsApp Send message in C#

    What's App Number Send Message For C# code   Dim3 Technology and solutions Visual studio solution Right click-->manage nuget pa...

    What's App Number Send Message For C# code  
    Dim3 Technology and solutions
     Visual studio solution Right click-->manage nuget packages for solution -->search whatsapp api install
    
    
    string from = "9199********";
            string to = txtTo.Text;//Sender Mobile
            string msg = txtMessage.Text;
    
            WhatsApp waobj = new WhatsApp(from, "BnXk*******B0=", "NickName", true, true);
    
            waobj.OnConnectSuccess += () =>        {
                MessageBox.Show("Connected to whatsapp...");
    
                waobj.OnLoginSuccess += (phoneNumber, data) =>            {
                    wa.SendMessage(to, msg);
                    MessageBox.Show("Message Sent...");
                };
    
                waobj.OnLoginFailed += (data) =>            {
                    MessageBox.Show("Login Failed : {0}", data); 
                };
    
                waobj.Login();        };
    
            waobj.OnConnectFailed += (ex) =>        {
                MessageBox.Show("Connection Failed...");
            };
    
            waobj.Connect();

    1 comment: