Send Message On WhatAspp Number Using Web Service

Here are the steps, 
 
Step 1

Click here to download WART (WhatsApp Registration Tool). We must have to Register sender number using this tool.
 
Follow the below given steps,

 
 
Step 2

Run WART.exe to register your mobile number from which you want to send a message.
 


Step 3

Complete your registration process and enter Confirmation code to generate password.
 
tool


Whatsapp tool page

Step 4

You will Receive password that we will use in code, please copy and save this password for now.
 
Setting Page
 
Step 5

Now Create new ASP.NET Web Application and give name 'WhatsappService'

 

Step 6

Select empty template for now

 

Step 7

Add new web service (ASMX) file.
 
 

Step 8

Go to Tools, NuGet Package Manager, THEN Manage Nuget Packages for Solutions, and search for Whatsapp.
 
code
 
Step 9

Install Whatsapp API for .NET
 
 
 
 

Step 10

Now create a Web Method 'SendMessage' that accept 2 parameter: 'ToNumber' and 'Message' as in the following, 
 
 
Step 11

Now run the service and call 'SendMessage' Method.

whatapp app

Step 12

Pass Mobile number and Message and click on 'Invoke'.

Send message
 
Step 13

It sends the message and display the success message as per the following screenshot.
 
 
 
Step 14

Now we will check WhatsApp. The following is the WhatsApp screen which displays the message which we sent from Webservice.
 
 
 
 
You can integrate this service in your website and manage contact us or Enquiry data. Also there are other option and function in WhatsApp API to send image or audio, etc.

Audio code 
 
Hope you like the article, Thank you.

Up Next
    Ebook Download
    View all
    Learn
    View all