BaseClient
The generated flat client, its dispatch contract, and the full method table.
BaseClient
Generated file warning: this page is generated by
packages/schema/scripts/gen-client-reference-docs.ts. Do not edit generated method content by hand.
BaseClient is generated from the registry. Each method is a one-line binding, for example:
/** Sends a text message to a chat */
public sendText = implementMethod(Methods.sendText);At runtime each call normalizes arguments, validates them with the method's Zod input schema, then dispatches to execute(meta.wapiOverride ?? meta.functionName, validatedParams) (falling back to pup() page evaluation). See Argument normalization.
Method dispatch table
| Method | Namespace | Dispatch target | Parameter order | Output |
|---|---|---|---|---|
addLabel | labels | addLabel | label, chatId | boolean |
addParticipant | groups | addParticipant | groupId, contactId | boolean |
approveGroupJoinRequest | groups | approveGroupJoinRequest | groupId, contactId | string | boolean |
archiveChat | chats | archiveChat | chatId | boolean |
blockContact | contacts | contactBlock | contactId | boolean |
checkNumberStatus | contacts | checkNumberStatus | contactId | any |
checkReadReceipts | contacts | checkReadReceipts | contactId | boolean | string |
clearChat | chats | clearChat | chatId | boolean |
createGroup | groups | createGroup | name, contacts | any |
decryptMedia | media | decryptMedia | message | string |
deleteAllStatus | status | deleteAllStatus | - | any |
deleteChat | chats | deleteChat | chatId | boolean |
deleteMessage | messages | deleteMessage | chatId, messageId, onlyLocal | boolean |
deleteStatus | status | deleteStatus | statusesToDelete | any |
demoteParticipant | groups | demoteParticipant | groupId, contactId | boolean | string |
downloadMedia | media | downloadMedia | message, path | string |
forwardMessages | messages | forwardMessages | to, messages, skipMyMessages | object { _serialized }[] | boolean |
getAllChatIds | chatIds | getAllChatIds | - | string[] |
getAllChats | chats | getAllChats | withNewMessagesOnly | any[] |
getAllCommunities | communities | getAllCommunities | - | string[] |
getAllContacts | contacts | getAllContacts | - | any[] |
getAllGroups | groups | getAllGroups | withNewMessagesOnly | any[] |
getAllLabels | labels | getAllLabels | - | any[] |
getAllMessages | messages | getAllMessages | chatId, includeMe, includeNotifications | any[] |
getBatteryLevel | session | getBatteryLevel | - | number |
getBlockedIds | contacts | getBlockedIds | - | string[] |
getBusinessProducts | business | getBusinessProfilesProducts | contactId | any |
getBusinessProfile | business | getBusinessProfile | contactId | any |
getChat | chats | getChat | chatId | any |
getChatsByLabel | labels | getChatsByLabel | label | any[] |
getChatWithNonContacts | chats | getChatWithNonContacts | - | any[] |
getCommonGroups | contacts | getCommonGroups | contactId | any |
getCommunityAdminIds | communities | getCommunityAdminIds | communityId | any |
getCommunityAdmins | communities | getCommunityAdmins | communityId | any |
getCommunityInfo | communities | getCommunityInfo | communityId | any |
getCommunityParticipantIds | communities | getCommunityParticipantIds | communityId | any |
getCommunityParticipants | communities | getCommunityParticipants | communityId | any |
getConnectionState | session | getConnectionState | - | any |
getContact | contacts | getContact | contactId | any |
getFeatures | session | getFeatures | - | any |
getGroupAdmins | groups | getGroupAdmins | groupId | any[] |
getGroupInfo | groups | getGroupInfo | groupId | any |
getGroupInviteLink | groups | getGroupInviteLink | groupId | string |
getGroupMembers | groups | getGroupMembers | groupId | any[] |
getGroupMembersId | groups | getGroupMembersId | groupId | string[] |
getHostNumber | session | getHostNumber | - | string |
getKickedGroups | groups | getKickedGroups | - | string[] |
getLicenseType | session | getLicenseType | - | any |
getLoadedMessageCount | session | getAmountOfLoadedMessages | - | number |
getMe | session | getMe | - | any |
getMessageById | messages | getMessageById | messageId | any |
getMessageInfo | messages | getMessageInfo | messageId | any |
getMessagesForLLM | messages | getGptArray | chatId, last | any |
getMyLastMessage | messages | getMyLastMessage | chatId | any |
getNumberProfile | contacts | getNumberProfile | contactId | any |
getOrder | business | getOrder | id | any |
getProcessStats | session | getProcessStats | - | any |
getProfilePicture | contacts | getProfilePicFromServer | chatId | string |
getSnapshot | session | getSnapshot | chatId, width, height | string |
getStarredMessages | messages | getStarredMessages | chatId | any[] |
getStatus | mystatus | getStatus | contactId | any |
getStories | status | getStories | - | any[] |
getUnsentMessages | messages | getUnsentMessages | - | any[] |
getUserAgent | session | getGeneratedUserAgent | userAgent | string |
getVCards | messages | getVCards | messageId | string[] |
getWAVersion | session | getWAVersion | - | string |
healthCheck | session | healthCheck | - | any |
isChatOnline | chats | isChatOnline | chatId | boolean | string |
isPlugged | session | getIsPlugged | - | boolean |
joinGroupViaLink | groups | joinGroupViaLink | link, returnChatObj | any |
leaveGroup | groups | leaveGroup | groupId | any |
loadEarlierMessages | messages | loadEarlierMessages | chatId, count, includeMe | any[] |
markAsRead | chats | markAsRead | chatId | boolean |
markAsUnread | chats | markAsUnread | chatId | boolean |
muteChat | chats | muteChat | chatId, muteDuration | string | boolean | number |
pinChat | chats | pinChat | chatId | boolean |
postImageStatus | status | postImageStatus | image, caption | any |
postTextStatus | status | postTextStatus | text, backgroundColor, font | any |
postVideoStatus | status | postVideoStatus | video, caption | any |
promoteParticipant | groups | promoteParticipant | groupId, contactId | boolean | string |
react | messages | react | messageId, emoji | boolean |
rejectGroupJoinRequest | groups | rejectGroupJoinRequest | groupId, contactId | string | boolean |
removeLabel | labels | removeLabel | label, chatId | boolean |
removeParticipant | groups | removeParticipant | groupId, contactId | boolean |
revokeGroupInviteLink | groups | revokeGroupInviteLink | groupId | string | boolean |
sendAdvancedButtons | messages | sendAdvancedButtons | to, body, buttons, text, footer, filename | object { _serialized } | boolean |
sendAudio | messages | sendAudio | to, file, filename, quotedMsgId | object { _serialized } | boolean |
sendBanner | messages | sendBanner | to, base64 | object { _serialized } | boolean |
sendButtons | messages | sendButtons | to, body, buttons, title, footer | object { _serialized } | boolean |
sendContact | messages | sendContact | to, contactId | object { _serialized } | boolean |
sendFile | messages | sendFile | to, file, filename, caption | object { _serialized } | string |
sendFileFromUrl | messages | sendFileFromUrl | to, url, filename, caption, headers | string | boolean |
sendImage | messages | sendImage | to, imgData, filename, caption, id, waitForId | object { _serialized } | boolean | string |
sendLinkWithAutoPreview | messages | sendLinkWithAutoPreview | to, url, text, thumbnail, quotedMsgId, customSize | object { _serialized } | boolean |
sendListMessage | messages | sendListMessage | to, sections, title, description, actionText | object { _serialized } | boolean |
sendLocation | messages | sendLocation | to, lat, lng, loc, address, url | object { _serialized } | boolean |
sendMessageWithThumb | messages | sendMessageWithThumb | thumb, url, title, description, content, to, quotedMsgId, customSize | object { _serialized } | boolean |
sendMultipleContacts | messages | sendMultipleContacts | to, contactIds | object { _serialized } | boolean |
sendPaymentRequest | messages | sendPaymentRequest | to, amount, currency, message | object { _serialized } | boolean |
sendPoll | messages | sendPoll | to, name, options, selectableCount | object { _serialized } | boolean |
sendPtt | messages | sendPtt | to, file, quotedMsgId | object { _serialized } | boolean |
sendReplyWithMentions | messages | sendReplyWithMentions | to, content, replyMessageId, hideTags, mentions | object { _serialized } | boolean |
sendSeen | messages | sendSeen | chatId | boolean |
sendText | messages | sendText | to, content, options | object { _serialized } | boolean | string |
sendTextWithMentions | messages | sendTextWithMentions | to, content, hideTags, mentions | object { _serialized } | boolean |
sendVCard | messages | sendVCard | to, vcard, contactName, contactNumber | boolean |
sendVideoAsGif | messages | sendVideoAsGif | to, file, filename, caption, quotedMsgId | object { _serialized } | boolean |
sendYouTubeLink | messages | sendYoutubeLink | to, url, text, thumbnail, quotedMsgId, customSize | object { _serialized } | boolean |
setChatEphemeral | chats | setChatEphemeral | chatId, ephemeral | boolean |
setGroupDescription | groups | setGroupDescription | groupId, description | boolean |
setGroupEditToAdminsOnly | groups | setGroupEditToAdminsOnly | groupId, onlyAdmins | boolean |
setGroupIcon | groups | setGroupIcon | groupId, image | boolean |
setGroupTitle | groups | setGroupTitle | groupId, title | boolean |
setGroupToAdminsOnly | groups | setGroupToAdminsOnly | groupId, onlyAdmins | boolean |
setMyName | session | setMyName | name | boolean |
setMyStatus | session | setMyStatus | statusText | boolean |
setProfilePicture | session | setProfilePic | image | boolean |
starMessage | messages | starMessage | messageId | boolean |
unarchiveChat | chats | unarchiveChat | chatId | boolean |
unblockContact | contacts | contactUnblock | contactId | boolean |
unmuteChat | chats | unmuteChat | chatId | string | boolean | number |
unpinChat | chats | unpinChat | chatId | boolean |
unstarMessage | messages | unstarMessage | messageId | boolean |

Was this helpful?
Wally and his cute companion coffee mug are coding day and night to keep this up-to-date!
