INSTANCE API
[POST] Create Instance
Create New Instance ID
https://new.sentwa.com/api/createinstance.php?access_token=e10adc3949ba59abbe56e0xxxxxxxxxx
access_token | e10adc3949ba59abbe56e0xxxxxxxxxx |
[POST] Get QR Code
Display QR code to login to Whatsapp web. You can get the results returned via Webhook
https://new.sentwa.com/api/getqrcode.php?instance_id=609ACF283XXXX&access_token=e10adc3949ba59abbe56e0xxxxxxxxxx
instance_id | 609ACF283XXXX |
access_token | e10adc3949ba59abbe56e0xxxxxxxxxx |
[POST] Set Webhook
Get all return values from Whatsapp, like connection status, incoming message, outgoing message, disconnected, change battery, etc
https://new.sentwa.com/api/setwebhook.php?webhook_url=https://webhook.site/1b25464d6833784f96eef4xxxxxxxxxx&enable=true&instance_id=609ACF283XXXX&access_token=e10adc3949ba59abbe56e0xxxxxxxxxx
webhook_url | https://webhook.site/1b25464d6833784f96eef4xxxxxxxxxx |
enable | true |
instance_id | 609ACF283XXXX |
access_token | e10adc3949ba59abbe56e0xxxxxxxxxx |
[POST] Reconnect Instance
Re-initiate connection from app to Whatsapp web when lost connection
https://new.sentwa.com/api/reconnect.php?instance_id=609ACF283XXXX&access_token=e10adc3949ba59abbe56e0xxxxxxxxxx
instance_id | 609ACF283XXXX |
access_token | e10adc3949ba59abbe56e0xxxxxxxxxx |
[POST] Reboot Instance
Logout Whatsapp web and do a fresh scan
https://new.sentwa.com/api/reboot.php?instance_id=609ACF283XXXX&access_token=e10adc3949ba59abbe56e0xxxxxxxxxx
instance_id | 609ACF283XXXX |
access_token | e10adc3949ba59abbe56e0xxxxxxxxxx |
[POST] Reset Instance
Logout WhatsApp Web, change Instance ID, delete all old instance data
https://new.sentwa.com/api/resetinstance.php?instance_id=609ACF283XXXX&access_token=e10adc3949ba59abbe56e0xxxxxxxxxx
instance_id | 609ACF283XXXX |
access_token | e10adc3949ba59abbe56e0xxxxxxxxxx |
SEND API
[POST] Send Text
Send WhatsApp message in text format
https://new.sentwa.com/api/send.php?number=84933313xxx&type=text&message=test%20message&instance_id=609ACF283XXXX&access_token=e10adc3949ba59abbe56e0xxxxxxxxxx
number | 84933313xxx |
type | text |
message | test message |
instance_id | 609ACF283XXXX |
access_token | e10adc3949ba59abbe56e0xxxxxxxxxx |
[POST] Send File
Send WhatsApp message with file attachment
https://new.sentwa.com/api/send.php?number=84933313xxx&type=media&message=test%20message&media_url=https://i.pravatar.cc&filename=file_test.jpg&instance_id=609ACF283XXXX&access_token=e10adc3949ba59abbe56e0xxxxxxxxxx
number | 84933313xxx |
type | media |
message | test message |
media_url | https://i.pravatar.cc |
filename | file_test.pdf |
instance_id | 609ACF283XXXX |
access_token | e10adc3949ba59abbe56e0xxxxxxxxxx |
GROUP API
[POST] Send Text to Group
Send WhatsApp message to a chat group in text format
https://new.sentwa.com/api/sendgroupmsg.php?group_id=84987694574-1618740914@g.us&type=text&message=test%20message&instance_id=609ACF283XXXX&access_token=e10adc3949ba59abbe56e0xxxxxxxxxx
PARAMETER
group_id | 84987694574-1618740914@g.us |
type | text |
message | test message |
instance_id | 609ACF283XXXX |
access_token | e10adc3949ba59abbe56e0xxxxxxxxxx |
[POST] Send File to Group
Send WhatsApp message to a chat group with file attachment
https://new.sentwa.com/api/sendgroupmsg.php?group_id=84987694574-1618740914@g.us&type=media&message=test%20message&media_url=https://i.pravatar.cc&filename=file_test.jpg&instance_id=609ACF283XXXX&access_token=e10adc3949ba59abbe56e0xxxxxxxxxx
PARAMETER
group_id | 84987694574-1618740914@g.us |
type | media |
message | test message |
media_url | https://i.pravatar.cc |
filename | file_test.pdf |
instance_id | 609ACF283XXXX |
access_token | e10adc3949ba59abbe56e0xxxxxxxxxx |