919834129437 sales@waapi.in

WhatsApp Integration with C# – RestSharp

Jun 4, 2021 | API Documentation | 0 comments

GET Login to Waapi

http://192.168.1.36:44442/api/login?from=GKH-UIJ-UGE-FGH-MLV&email=admin@callcenter.in&serverKey=FYE-DKX-PSX-UNV-BAN

login your instance

PARAMS
From GKH-UIJ-UGE-FGH-MLV
Email admin@callcenter.in
ServerKey FYE-DKX-PSX-UNV-BAN
Example Request                                  Login to Waapi
var client = new RestClient("http://192.168.1.36:44442/api/login?from=GKH-UIJ-UGE-FGH-MLV&email=admin@callcenter.in&serverKey=FYE-DKX-PSX-UNV-BAN");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

GET

Send Text Message

http://192.168.1.36:44442/api/sendmessage?from=GKH-UIJ-UGE-FGH-MLV&message=your message&type=text&to=012138227697&messageId=ab1asas3t2ss4aas1g5&callback=http://your-url.com/get/waapi/status
from GKH-UIJ-UGE-FGH-MLV
Massage your message
type text
to 012138227697
messageId ab1asas3t2ss4aas1g5
callback http://your-url.com/get/waapi/status
Example Request
Send Text Message
var client = new RestClient("http://192.168.1.36:44442/api/sendmessage?from=GKH-UIJ-UGE-FGH-MLV&message=your message&type=text&to=012138227697&messageId=ab1asas3t2ss4aas1g5&callback=http://your-url.com/get/waapi/status");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

GET

Send Image/Video Message

http://192.168.1.36:44442/api/sendMessage?from=GKH-UIJ-UGE-FGH-MLV&caption=test caption&message=https://www.waapi.in/wp-content/uploads/2021/04/WA.png&type=document&to=012138227697&messageId=ab1asas3t2ss4aas1g5&callback=http://your-url.com/get/waapi/status
from

GKH-UIJ-UGE-FGH-MLV

caption
test caption
Massage https://www.waapi.in/wp-content/uploads/2021/04/WA.png
type document
to 012138227697
messageId ab1asas3t2ss4aas1g5
callback http://your-url.com/get/waapi/status
Example Request
Send Image/Video Message
var client = new RestClient("http://192.168.1.36:44442/api/sendMessage?from=GKH-UIJ-UGE-FGH-MLV&caption=test caption&message=https://www.waapi.in/wp-content/uploads/2021/04/WA.png&type=document&to=012138227697&messageId=ab1asas3t2ss4aas1g5&callback=http://your-url.com/get/waapi/status");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

GET

Send Document(PDF,CSV)

Note :
caption could not be sent with file’s , it will be sent as text message while sending pdf
caption is optional parameter
from GKH-UIJ-UGE-FGH-MLV
caption
test caption
Massage https://www.waapi.in/wp-content/uploads/2021/04/WA.png
type document
to 012138227697
messageId ab1asas3t2ss4aas1g5
callback http://your-url.com/get/waapi/status
Example Request
Send Document(PDF,CSV)
var client = new RestClient("http://192.168.1.36:44442/api/sendMessage?from=GKH-UIJ-UGE-FGH-MLV&message=https://www.waapi.in/wp-content/uploads/2021/04/WA.png&type=document&to=012138227697&messageId=ab1asas3t2ss4aas1g5&callback=http://your-url.com/get/waapi/status");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Extra parameters :

status : Queued , NOT REGISTERED , SUCCESS , FAILED
number : search by customer number

from
GKH-UIJ-UGE-FGH-MLV
fromdate
01-06-2021
today date 30-06-2021
fomat json
Example Request
Message logs
var client = new RestClient("http://192.168.1.36:44442/api/messagestatus?from=GKH-UIJ-UGE-FGH-MLV&fromdate=01-06-2021&todate=30-06-2021&fomat=json");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

GET Check Server Status

http://192.168.1.36:44442/api/serverstatus?from=GKH-UIJ-UGE-FGH-MLV&flag=login

check instance is logged in on server or not

Extra parameters :

status : Queued , NOT REGISTERED , SUCCESS , FAILED
number : search by customer number

from
GKH-UIJ-UGE-FGH-MLV
flag
login
Example Request
Check Server Status
var client = new RestClient("http://192.168.1.36:44442/api/serverstatus?from=GKH-UIJ-UGE-FGH-MLV&flag=login");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
GET Logout
http://192.168.1.36:44442/api/logout?from=GKH-UIJ-UGE-FGH-MLV&email=admin@callcenter.in

Logout for your instance , old data may deleted

from
GKH-UIJ-UGE-FGH-MLV
email
admin@callcenter.in
Example Request
Logout
var client = new RestClient("http://192.168.1.36:44442/api/logout?from=GKH-UIJ-UGE-FGH-MLV&email=admin@callcenter.in");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
GET Restart Server
http://192.168.1.36:44442/api/restart?from=GKH-UIJ-UGE-FGH-MLV&email=admin@callcenter.in

Restart your instance

from
GKH-UIJ-UGE-FGH-MLV
email
admin@callcenter.in
Example Request
Restart Server
var client = new RestClient("http://192.168.1.36:44442/api/restart?from=GKH-UIJ-UGE-FGH-MLV&email=admin@callcenter.in");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Other posts you might like

WhatsApp Unofficial API For Developers

WhatsApp Unofficial API For Developers

Powerful WhatsApp API that enables you to send, receive, and track WhatsApp messages effortlessly Steps :1. Pair PhonePair phone by scanning a QR code to connect to waapi.2. Start Sending MessagesAfter connection, you can send your first WhatsApp message in your...

How to Prevent WhatsApp Number to get Banned?

How to Prevent WhatsApp Number to get Banned?

Dos and Don'ts: Important: Do NOT send messages which get you a report. As long as you don't get reports from users who you sent a message, your account will be mostly fine.Having real content, a survey that the person agreed with is different than a marketing message...

Official WhatsApp API Restrictions

Official WhatsApp API Restrictions

Although the official API is a reliable and secure platform, eCommerce should consider the following points before upgrading their WhatsApp account: Message Restriction: Before sending messages to users for the first time, the official WhatsApp API account must send...