GET
Login to Waapi
login your instance
PARAMS
|
|
from |
GKH-UIJ-UGE-FGH-MLV
|
admin@callcenter.in
|
|
serverKey | FYE-DKX-PSX-UNV-BAN |
GET
Send Text Message
PARAMS | |
from |
GKH-UIJ-UGE-FGH-MLV
|
message |
your message
|
type | text |
to |
012138227697
|
messageId | ab1asas3t2ss4aas1g5 |
callback
|
http://your-url.com/get/waapi/status |
var http = require(‘follow-redirects’).http; var fs = require(‘fs’); var options = { ‘method’: ‘GET’, ‘hostname’: ‘192.168.1.36’, ‘port’: 44442, ‘path’: ‘/api/sendmessage?from=GKH-UIJ-UGE-FGH-MLV&message=your%20message&type=text&to=012138227697&messageId=ab1asas3t2ss4aas1g5&callback=http://your-url.com/get/waapi/status’, ‘headers’: { }, ‘maxRedirects’: 20 }; var req = http.request(options, function (res) { var chunks = []; res.on(“data”, function (chunk) { chunks.push(chunk); }); res.on(“end”, function (chunk) { var body = Buffer.concat(chunks); console.log(body.toString()); }); res.on(“error”, function (error) { console.error(error); }); }); req.end();
GET
Send Image/Video Message
PARAMS | |
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 |
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
PARAMS | |
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 |
GET
Message logs
format : html/json
Extra parameters :
status : Queued , NOT REGISTERED , SUCCESS , FAILED
number : search by customer number
PARAMS
|
|
from |
GKH-UIJ-UGE-FGH-MLV
|
fromdate |
01-06-2021
|
todate |
30-06-2021
|
fomat | json |
Example Request Message logs
var http = require(‘follow-redirects’).http; var fs = require(‘fs’); var options = { ‘method’: ‘GET’, ‘hostname’: ‘192.168.1.36’, ‘port’: 44442, ‘path’: ‘/api/messagestatus?from=GKH-UIJ-UGE-FGH-MLV&fromdate=01-06-2021&todate=30-06-2021&fomat=json’, ‘headers’: { }, ‘maxRedirects’: 20 }; var req = http.request(options, function (res) { var chunks = []; res.on(“data”, function (chunk) { chunks.push(chunk); }); res.on(“end”, function (chunk) { var body = Buffer.concat(chunks); console.log(body.toString()); }); res.on(“error”, function (error) { console.error(error); }); }); req.end();
GET
Check Server Status
check instance is logged in on server or not
PARAMS | |
from |
GKH-UIJ-UGE-FGH-MLV
|
flag | login |
var http = require(‘follow-redirects’).http; var fs = require(‘fs’); var options = { ‘method’: ‘GET’, ‘hostname’: ‘192.168.1.36’, ‘port’: 44442, ‘path’: ‘/api/serverstatus?from=GKH-UIJ-UGE-FGH-MLV&flag=login’, ‘headers’: { }, ‘maxRedirects’: 20 }; var req = http.request(options, function (res) { var chunks = []; res.on(“data”, function (chunk) { chunks.push(chunk); }); res.on(“end”, function (chunk) { var body = Buffer.concat(chunks); console.log(body.toString()); }); res.on(“error”, function (error) { console.error(error); }); }); req.end();
GET
Logout
Logout for your instance , old data may deleted
PARAMS | |
from |
GKH-UIJ-UGE-FGH-MLV
|
admin@callcenter.in |
var http = require(‘follow-redirects’).http; var fs = require(‘fs’); var options = { ‘method’: ‘GET’, ‘hostname’: ‘192.168.1.36’, ‘port’: 44442, ‘path’: ‘/api/logout?from=GKH-UIJ-UGE-FGH-MLV&email=admin@callcenter.in’, ‘headers’: { }, ‘maxRedirects’: 20 }; var req = http.request(options, function (res) { var chunks = []; res.on(“data”, function (chunk) { chunks.push(chunk); }); res.on(“end”, function (chunk) { var body = Buffer.concat(chunks); console.log(body.toString()); }); res.on(“error”, function (error) { console.error(error); }); }); req.end();
GET
Restart Server
Restart your instance
PARAMS | |
from |
GKH-UIJ-UGE-FGH-MLV
|
admin@callcenter.in |