Session Client API Generated client method reference for the session namespace.
Generated file warning: this page is generated by packages/schema/scripts/gen-client-reference-docs.ts. Do not edit generated method content by hand.
This page documents 16 schema-registry client methods in the session namespace.
Get phone battery level
Prop Value Namespace sessionAction readFunctionality bothPositional parameter order - Aliases session.getBatteryLevelDeprecated aliases - License noneWAPI override - Deprecated No
Type Method Path Name Status Primary GET/api/session/getBatteryLevelgetBatteryLevelActive Alias GET/api/getBatteryLevelgetBatteryLevelActive
Embedded SocketClient Easy API
const result = await client. getBatteryLevel ({});
// namespaced form: client.session.getBatteryLevel(...)
This method does not define input parameters.
Prop Value Return type number
Get connection state
Prop Value Namespace sessionAction readFunctionality bothPositional parameter order - Aliases session.getConnectionStateDeprecated aliases - License noneWAPI override - Deprecated No
Type Method Path Name Status Primary GET/api/session/getConnectionStategetConnectionStateActive Alias GET/api/getConnectionStategetConnectionStateActive
Embedded SocketClient Easy API
const result = await client. getConnectionState ({});
// namespaced form: client.session.getConnectionState(...)
This method does not define input parameters.
Returns raw, unstructured data from WhatsApp Web. Narrow or validate the shape before relying on specific fields.
Get enabled features
Prop Value Namespace sessionAction readFunctionality bothPositional parameter order - Aliases session.getFeaturesDeprecated aliases - License noneWAPI override - Deprecated No
Type Method Path Name Status Primary GET/api/session/getFeaturesgetFeaturesActive Alias GET/api/getFeaturesgetFeaturesActive
Embedded SocketClient Easy API
const result = await client. getFeatures ({});
// namespaced form: client.session.getFeatures(...)
This method does not define input parameters.
Returns raw, unstructured data from WhatsApp Web. Narrow or validate the shape before relying on specific fields.
Get host phone number
Prop Value Namespace sessionAction readFunctionality bothPositional parameter order - Aliases session.getHostNumberDeprecated aliases - License noneWAPI override - Deprecated No
Type Method Path Name Status Primary GET/api/session/getHostNumbergetHostNumberActive Alias GET/api/getHostNumbergetHostNumberActive
Embedded SocketClient Easy API
const result = await client. getHostNumber ({});
// namespaced form: client.session.getHostNumber(...)
This method does not define input parameters.
Prop Value Return type string
Get license type
Prop Value Namespace sessionAction readFunctionality bothPositional parameter order - Aliases session.getLicenseTypeDeprecated aliases - License noneWAPI override - Deprecated No
Type Method Path Name Status Primary GET/api/session/getLicenseTypegetLicenseTypeActive Alias GET/api/getLicenseTypegetLicenseTypeActive
Embedded SocketClient Easy API
const result = await client. getLicenseType ({});
// namespaced form: client.session.getLicenseType(...)
This method does not define input parameters.
Returns raw, unstructured data from WhatsApp Web. Narrow or validate the shape before relying on specific fields.
Get loaded message count
Prop Value Namespace sessionAction readFunctionality bothPositional parameter order - Aliases getAmountOfLoadedMessages, session.getAmountOfLoadedMessages, session.getLoadedMessageCountDeprecated aliases getAmountOfLoadedMessages, session.getAmountOfLoadedMessagesLicense noneWAPI override getAmountOfLoadedMessagesDeprecated No
Type Method Path Name Status Primary GET/api/session/getLoadedMessageCountgetLoadedMessageCountActive Deprecated alias GET/api/getAmountOfLoadedMessagesgetAmountOfLoadedMessagesDeprecated Alias GET/api/getLoadedMessageCountgetLoadedMessageCountActive Deprecated alias GET/api/session/getAmountOfLoadedMessagessession.getAmountOfLoadedMessagesDeprecated
Embedded SocketClient Easy API
const result = await client. getLoadedMessageCount ({});
// namespaced form: client.session.getLoadedMessageCount(...)
This method does not define input parameters.
Prop Value Return type number
Get host account info
Prop Value Namespace sessionAction readFunctionality bothPositional parameter order - Aliases session.getMeDeprecated aliases - License noneWAPI override - Deprecated No
Type Method Path Name Status Primary GET/api/session/getMegetMeActive Alias GET/api/getMegetMeActive
Embedded SocketClient Easy API
const result = await client. getMe ({});
// namespaced form: client.session.getMe(...)
This method does not define input parameters.
Returns raw, unstructured data from WhatsApp Web. Narrow or validate the shape before relying on specific fields.
Get process statistics
Prop Value Namespace sessionAction readFunctionality bothPositional parameter order - Aliases session.getProcessStatsDeprecated aliases - License noneWAPI override - Deprecated No
Type Method Path Name Status Primary GET/api/session/getProcessStatsgetProcessStatsActive Alias GET/api/getProcessStatsgetProcessStatsActive
Embedded SocketClient Easy API
const result = await client. getProcessStats ({});
// namespaced form: client.session.getProcessStats(...)
This method does not define input parameters.
Returns raw, unstructured data from WhatsApp Web. Narrow or validate the shape before relying on specific fields.
Take screenshot
Prop Value Namespace sessionAction readFunctionality bothPositional parameter order chatId, width, heightAliases session.getSnapshot, session.takeScreenshot, takeScreenshotDeprecated aliases - License noneWAPI override - Deprecated No
Type Method Path Name Status Primary GET/api/session/getSnapshotgetSnapshotActive Alias GET/api/getSnapshotgetSnapshotActive Alias GET/api/session/takeScreenshotsession.takeScreenshotActive Alias GET/api/takeScreenshottakeScreenshotActive
Embedded SocketClient Easy API
const result = await client. getSnapshot ({
chatId: "447123456789@c.us" ,
width: 1 ,
height: 1 ,
});
// namespaced form: client.session.getSnapshot(...)
Prop Value Return type string
Get user agent
Prop Value Namespace sessionAction readFunctionality bothPositional parameter order userAgentAliases getGeneratedUserAgent, session.getGeneratedUserAgent, session.getUserAgentDeprecated aliases getGeneratedUserAgent, session.getGeneratedUserAgentLicense noneWAPI override getGeneratedUserAgentDeprecated No
Type Method Path Name Status Primary GET/api/session/getUserAgentgetUserAgentActive Deprecated alias GET/api/getGeneratedUserAgentgetGeneratedUserAgentDeprecated Alias GET/api/getUserAgentgetUserAgentActive Deprecated alias GET/api/session/getGeneratedUserAgentsession.getGeneratedUserAgentDeprecated
Embedded SocketClient Easy API
const result = await client. getUserAgent ({
userAgent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)" ,
});
// namespaced form: client.session.getUserAgent(...)
Prop Value Return type string
Get WhatsApp Web version
Prop Value Namespace sessionAction readFunctionality bothPositional parameter order - Aliases getWhatsAppVersion, session.getWAVersion, session.getWhatsAppVersionDeprecated aliases - License noneWAPI override - Deprecated No
Type Method Path Name Status Primary GET/api/session/getWAVersiongetWAVersionActive Alias GET/api/getWAVersiongetWAVersionActive Alias GET/api/getWhatsAppVersiongetWhatsAppVersionActive Alias GET/api/session/getWhatsAppVersionsession.getWhatsAppVersionActive
Embedded SocketClient Easy API
const result = await client. getWAVersion ({});
// namespaced form: client.session.getWAVersion(...)
This method does not define input parameters.
Prop Value Return type string
Health check
Prop Value Namespace sessionAction readFunctionality bothPositional parameter order - Aliases session.healthCheckDeprecated aliases - License noneWAPI override - Deprecated No
Type Method Path Name Status Primary GET/api/session/healthCheckhealthCheckActive Alias GET/api/healthCheckhealthCheckActive
Embedded SocketClient Easy API
const result = await client. healthCheck ({});
// namespaced form: client.session.healthCheck(...)
This method does not define input parameters.
Returns raw, unstructured data from WhatsApp Web. Narrow or validate the shape before relying on specific fields.
Check if phone is charging
Prop Value Namespace sessionAction readFunctionality bothPositional parameter order - Aliases getIsPlugged, session.getIsPlugged, session.isPluggedDeprecated aliases getIsPlugged, session.getIsPluggedLicense noneWAPI override getIsPluggedDeprecated No
Type Method Path Name Status Primary GET/api/session/isPluggedisPluggedActive Deprecated alias GET/api/getIsPluggedgetIsPluggedDeprecated Alias GET/api/isPluggedisPluggedActive Deprecated alias GET/api/session/getIsPluggedsession.getIsPluggedDeprecated
Embedded SocketClient Easy API
const result = await client. isPlugged ({});
// namespaced form: client.session.isPlugged(...)
This method does not define input parameters.
Prop Value Return type boolean
Set host name
Prop Value Namespace sessionAction updateFunctionality personal-onlyPositional parameter order nameAliases session.setDisplayName, session.setMyName, session.setName, setDisplayNameDeprecated aliases - License noneWAPI override - Deprecated No
Type Method Path Name Status Primary PUT/api/session/setNamesetMyNameActive Alias PUT/api/session/setDisplayNamesession.setDisplayNameActive Alias PUT/api/session/setMyNamesession.setMyNameActive Alias PUT/api/setDisplayNamesetDisplayNameActive Alias PUT/api/setMyNamesetMyNameActive
Embedded SocketClient Easy API
const result = await client. setMyName ({
name: "OpenWA Bot" ,
});
// namespaced form: client.session.setName(...)
Prop Value Return type boolean
Set host status
Prop Value Namespace sessionAction updateFunctionality bothPositional parameter order statusTextAliases session.setMyStatus, session.setStatus, session.setStatusText, setStatusTextDeprecated aliases - License noneWAPI override - Deprecated No
Type Method Path Name Status Primary PUT/api/session/setStatussetMyStatusActive Alias PUT/api/session/setMyStatussession.setMyStatusActive Alias PUT/api/session/setStatusTextsession.setStatusTextActive Alias PUT/api/setMyStatussetMyStatusActive Alias PUT/api/setStatusTextsetStatusTextActive
Embedded SocketClient Easy API
const result = await client. setMyStatus ({
statusText: "Available" ,
});
// namespaced form: client.session.setStatus(...)
Prop Value Return type boolean
Set profile picture
🧵 Insiders Licensed feature
Insiders feature
May require an insiders license for advanced or early-access capabilities.
Get Insiders
Prop Value Namespace sessionAction updateFunctionality bothPositional parameter order imageAliases session.setProfilePic, session.setProfilePicture, setProfilePicDeprecated aliases session.setProfilePic, setProfilePicLicense insidersWAPI override setProfilePicDeprecated No
Type Method Path Name Status Primary PUT/api/session/setProfilePicturesetProfilePictureActive Deprecated alias PUT/api/session/setProfilePicsession.setProfilePicDeprecated Deprecated alias PUT/api/setProfilePicsetProfilePicDeprecated Alias PUT/api/setProfilePicturesetProfilePictureActive
Embedded SocketClient Easy API
const result = await client. setProfilePicture ({
image: "data:image/png;base64,iVBORw0KGgo..." ,
});
// namespaced form: client.session.setProfilePicture(...)
Prop Value Return type boolean
Was this helpful? Wally and his cute companion coffee mug are coding day and night to keep this up-to-date!