Whatsap Rest Api for ajbot.chat
Whatsapp rest API will show like this,
How to use INSTANCE API?
Make sure your whatsapp account is successfully connected to the system
Please visit profile to find Instance ID and Access Token
Create Instance ID
https://ajbot.chat/api/create_instance?access_token=647a33a8cxxxx
Create a new Instance IDPARAMS
access_token | 647a33a8cxxxx |
Get QR Code
Structure of the GET request
https://ajbot.chat/api/get_qrcode?instance_id=609ACF283XXXX&access_token=647a33a8cxxxx
Display QR code to login to Whatsapp web. You can get the results returned via WebhookPARAMS
instance_id | 609ACF283XXXX |
access_token | 647a33a8cxxxx |
Set Receving Webhook
Structure of the GET request
https://ajbot.chat/api/set_webhook?webhook_url=https%3A%2F%2Fwebhook.site%2F1b25464d6833784f96eef4xxxxxxxxxx&enable=true&instance_id=609ACF283XXXX&access_token=647a33a8cxxxx
Get all return values from Whatsapp. Like connection status, Incoming message, Outgoing message, Disconnected, Change Battery,…PARAMS
webhook_url | https://webhook.site/1b25464d6833784f96eef4xxxxxxxxxx |
enable | true |
instance_id | 609ACF283XXXX |
access_token | 647a33a8cxxxx |
Reboot Instance
Structure of the GET request
https://ajbot.chat/api/reboot?instance_id=609ACF283XXXX&access_token=647a33a8cxxxx
Logout Whatsapp web and do a fresh scanPARAMS
instance_id | 609ACF283XXXX |
access_token | 647a33a8cxxxx |
Reset Instance
Structure of the GET request
https://ajbot.chat/api/reset_instance?instance_id=609ACF283XXXX&access_token=647a33a8cxxxx
This will logout Whatsapp web, Change Instance ID, Delete all old instance dataPARAMS
instance_id | 609ACF283XXXX |
access_token | 647a33a8cxxxx |
Reconnect
Structure of the GET request
https://ajbot.chat/api/reconnect?instance_id=609ACF283XXXX&access_token=647a33a8cxxxx
Re-initiate connection from app to Whatsapp web when lost connectionPARAMS
instance_id | 609ACF283XXXX |
access_token | 647a33a8cxxxx |
How to use SEND DIRECT MESSAGE API?
Send Text
Structure of the GET request
https://ajbot.chat/api/send?number=84933313xxx&type=text&message=test+message&instance_id=609ACF283XXXX&access_token=647a33a8cxxxx
Structure of the POST request
{ number: "{int}", type: "text", message: "{string}", instance_id: "{string}", access_token: "647a33a8cxxxx" }
Send a text message to a phone number through the appPARAMS
number | 84933313xxx |
type | text |
message | test message |
instance_id | 609ACF283XXXX |
access_token | 647a33a8cxxxx |
Send Media & File
Structure of the GET request
https://ajbot.chat/api/send?number=84933313xxx&type=media&message=test+message&media_url=https%3A%2F%2Fi.pravatar.cc&filename=file_test.jpg&instance_id=609ACF283XXXX&access_token=647a33a8cxxxx
Structure of the POST request
{ number: "{int}", type: "media", message: "{string}", media_url: "{string}", instance_id: "{string}", access_token: "647a33a8cxxxx" }
Send a media or file with message to a phone number through the appPARAMS
number | 84933313xxx |
type | media |
message | test message |
media_url | https://i.pravatar.cc |
filename (Just use for send document) | file_test.pdf |
instance_id | 609ACF283XXXX |
access_token | 647a33a8cxxxx |
How to use GROUP API?
Send Text Message Group
Structure of the GET request
https://ajbot.chat/api/send_group?group_id=120363029810xxxxxx@g.us&type=text&message=test+message&instance_id=609ACF283XXXX&access_token=647a33a8cxxxx
Structure of the POST request
{ group_id: " 120363029810xxxxxx@g.us", type: "text", message: "{string}", instance_id: "{string}", access_token: "647a33a8cxxxx" }
Send a text message to a group through the appPARAMS
group_id | 120363029810xxxxxx@g.us |
type | text |
message | test message |
instance_id | 609ACF283XXXX |
access_token | 647a33a8cxxxx |
Send Media & File Message Group
Structure of the GET request
https://ajbot.chat/api/send_group?group_id=120363029810xxxxxx@g.us&type=media&message=test+message&media_url=https%3A%2F%2Fi.pravatar/file_test.jpg&filename=file_test.jpg&instance_id=609ACF283XXXX&access_token=647a33a8cxxxx
Structure of the POST request
{ group_id: " 120363029810xxxxxx@g.us", type: "media", message: "{string}", media_url: "{string}", instance_id: "{string}", access_token: "647a33a8cxxxx" }
Send a media or file with message to a group through the appPARAMS
You can send pdf, mp4, mp3…Please change the media_url and filename
group_id | 120363029810xxxxxx@g.us |
type | media |
message | test message |
media_url | https://i.pravatar.cc/file_test.jpg |
filename (Just use for send document) | file_test.jpg (Please check the file link that can be accessed directly) |
instance_id | 609ACF283XXXX |
access_token | 647a33a8cxxxx |
You must be logged in to post a comment.