Advanced requests and extras
Read the details of how to use it in Requests.
There's a lib for nodejs here: Click here
Send a "read" message.
{ "connectionId": "YOUR_CONNECTION_ID", "method": "readMessages", "params": [ "[email protected]", [ { "remoteJid": "[email protected]", "id": "MESSAGE_ID", "participant": "IF_GROUP_DEFINE_THIS" } ] ] }
Send the status, like 'typing'.
Accepts: 'unavailable', 'available', 'composing', 'recording', 'paused'
{ "connectionId": "YOUR_CONNECTION_ID", "method": "sendPresenceUpdate", "params": [ "available", "[email protected]" ] }
Deleting messages.
{ "connectionId": "YOUR_CONNECTION_ID", "method": "sendMessage", "params": [ "[email protected]", { "delete": { "participant": "IF_GROUP_DEFINE_THIS", "id": "MESSAGE_ID", "fromMe": true } } ] }
Modifying Chats.
Archive a chat!
replace the lastMessages with the last messages from the chat which you have stored in your database.
replace the lastMessages with the last messages from the chat which you have stored in your database.
{ "connectionId": "YOUR_CONNECTION_ID", "method": "chatModify", "params": [ { "archive": true, "lastMessages": [ "THE_LAST_MESSAGES_FROM_THE_CHAT" ] }, "[email protected]" ] }
Mute a chat!
{ "connectionId": "YOUR_CONNECTION_ID", "method": "chatModify", "params": [ { "mute": 28800000 }, "[email protected]", [] ] }
Mark as read/undead!
replace the lastMessages with the last messages from the chat which you have stored in your database.
replace the lastMessages with the last messages from the chat which you have stored in your database.
{ "connectionId": "YOUR_CONNECTION_ID", "method": "chatModify", "params": [ { "markRead": false, "lastMessages": [ "THE_LAST_MESSAGES_FROM_THE_CHAT" ] }, "[email protected]", [] ] }
Delete a chat!
replace the lastMessages with the last messages from the chat which you have stored in your database.
replace the lastMessages with the last messages from the chat which you have stored in your database.
{ "connectionId": "YOUR_CONNECTION_ID", "method": "chatModify", "params": [ { "delete": true, "lastMessages": [ "THE_LAST_MESSAGES_FROM_THE_CHAT" ] }, "[email protected]", [] ] }
Pin/unpin a chat!
{ "connectionId": "YOUR_CONNECTION_ID", "method": "chatModify", "params": [ { "pin": true }, "[email protected]", [] ] }
Check if id is on whatsapp.
{ "connectionId": "YOUR_CONNECTION_ID", "method": "onWhatsApp", "params": [ "[email protected]" ] }
Change own status.
{ "connectionId": "YOUR_CONNECTION_ID", "method": "updateProfileStatus", "params": [ "Hi!" ] }
Change own name.
{ "connectionId": "YOUR_CONNECTION_ID", "method": "updateProfileName", "params": [ "status" ] }
To get the display picture of some person/group.
{ "connectionId": "YOUR_CONNECTION_ID", "method": "profilePictureUrl", "params": [ "[email protected]" ] }
To get in high definition
{ "connectionId": "YOUR_CONNECTION_ID", "method": "profilePictureUrl", "params": [ "[email protected]", "image" ] }
Fetch the ID status on whatsapp.
{ "connectionId": "YOUR_CONNECTION_ID", "method": "fetchStatus", "params": [ "[email protected]" ] }
Block/Unblock someone.
{ "connectionId": "YOUR_CONNECTION_ID", "method": "updateBlockStatus", "params": [ "[email protected]", "block" ] }
Get a business profile, such as description or category.
{ "connectionId": "YOUR_CONNECTION_ID", "method": "getBusinessProfile", "params": [ "[email protected]" ] }
Advanced.
There's extra informations which you can pass to the request, to better control it.
- Send a simple text, with the ID predefined!
{ "connectionId": "YOUR_CONNECTION_ID", "method": "sendMessage", "params": [ "[email protected]", { "text": "Hi! This was sent using Whats2API" }, { "messageId": "A_ALPHANUMERIC_ID" } ] }
- Ephemeral message, which disapear after a while!
{ "connectionId": "YOUR_CONNECTION_ID", "method": "sendMessage", "params": [ "[email protected]", { "text": "Hi! This was sent using Whats2API" }, { "ephemeralExpiration": 604800 } ] }
- Control the "forward" information!
{ "connectionId": "YOUR_CONNECTION_ID", "method": "sendMessage", "params": [ "[email protected]", { "text": "Hi! This was sent using Whats2API" }, { "contextInfo": { "forwardingScore": 2, "isForwarded": true } } ] }