getWhatsAppSession
Retrieve the current user’s connected WhatsApp session.Response
object | null
WhatsApp session object or null if not connected
string
Session ID
string
Unique session name
string
Associated phone number
string
Owner user ID
Date
Session creation timestamp
Date
Last update timestamp
Example
initiateWhatsAppSession
Create or reconnect to a WhatsApp session for the current user.Response
string
The unique session name created or reused
string
The session database ID
Example
Error Cases
- INTERNAL_SERVER_ERROR: Failed to create WhatsApp session
getSessionStatus
Check the current status of a WhatsApp session.Input Parameters
string
required
The session name to check
Response
string
Session status from WAHA API (e.g., “WORKING”, “SCAN_QR_CODE”, “STOPPED”)
Example
getSessionQR
Retrieve the QR code for authenticating a WhatsApp session.Input Parameters
string
required
The session name to get the QR code for
Response
string
Base64-encoded QR code image
Example
restartSession
Restart a WhatsApp session by stopping and starting it.Input Parameters
string
required
The session name to restart
Response
boolean
Indicates whether the session was restarted successfully
Example
updateSessionPhone
Update the phone number associated with a session.Input Parameters
string
required
The session database ID
string
required
The new phone number
Response
boolean
Indicates whether the phone number was updated successfully
Example
logoutSession
Logout and delete a WhatsApp session.Input Parameters
string
required
The session name to logout
Response
boolean
Indicates whether the logout was successful
Example
getWhatsAppGroups
Retrieve WhatsApp groups for a session with pagination and search.Input Parameters
string
required
The session name to fetch groups from
number
default:10
Maximum number of groups to return (minimum 1)
number
default:0
Pagination cursor (offset)
string
Optional search term to filter groups by name
Response
number | undefined
Cursor for the next page, or undefined if no more results
undefined
Total count not available without fetching all groups
Example
getWhatsAppContacts
Retrieve WhatsApp contacts for a session with pagination and search.Input Parameters
string
required
The session name to fetch contacts from
number
default:50
Maximum number of contacts to return (minimum 1)
number
default:0
Pagination cursor (offset)
string
Optional search term to filter contacts by name or number
Response
array
number | undefined
Cursor for the next page, or undefined if no more results
undefined
Total count not available