WhatsApp Account Query Related APIs
WhatsApp Account Query Related APIs
Query Online Agents (WhatsApp Accounts)
Type
API
URI
/group-dispatch-api/user/queryUserStatus
Request Method
POST、Content-Type: application/json
API Description
Query online agents and WhatsApp accounts
Request Parameter Description
| Field | Type | Required | Remarks |
|---|---|---|---|
| userId | int | No | Agent id (if not provided, query all agents) |
| userName | String | No | Agent login account (if not provided, query all agents) |
| source | int | Yes | Source: 1 pc, 2 mobile |
Request example:
{
"userId": 12,
"source": 2,
"userName": ""
}Response Parameter Description
Parameter Name Type Required Remarks code int Yes Status code message String Yes Description data List Yes Data
data Response Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| userId | int | Yes | Agent id |
| agentAccount | String | Yes | Agent account |
| whatsAppList | List | Yes | WhatsApp account list |
whatsAppList Response Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| String | Yes | ||
| name | String | No | Nickname |
- Response Example
{
"data": [
{
"userId": 12,
"agentAccount": "u1",
"whatsAppList": [
{
"whatsApp": "861821371272",
"name": "jack"
}
]
}
],
"code": 200,
"message": "success"
}Query All Online Agents + WhatsApp Accounts
Type
API
URI
/group-dispatch-api/user/queryAllOlWhatsAppInfo
Request Method
POST、Content-Type: application/json
API Description
Query online agents and WhatsApp accounts
Response Parameter Description
| Parameter Name | Type | Remarks |
|---|---|---|
| code | int | Status code |
| message | String | Description |
| data | list | Data |
data Response Parameter Description
| Parameter Name | Type | Remarks |
|---|---|---|
| source | String | Source: 1 pc, 2 mobile |
| list | String | Agent & WhatsApp account data |
list Response Parameter Description
| Parameter Name | Type | Remarks |
|---|---|---|
| agentAccount | String | Agent account |
| userName | String | Agent name |
| whatsAppList | list | WhatsApp account list |
whatsAppList Response Parameter Description
| Parameter Name | Type | Remarks |
|---|---|---|
| String | WhatsApp account | |
| name | String | WhatsApp nickname |
- Response Example
{
"code": 200,
"message": "Success ",
"data": [
{
"source": 1,
"list": [
{
"agentAccount": "202503101",
"userName": "202503101",
"whatsAppList": [
{
"whatsApp": "8618217331413",
"name": "chen"
}
],
"userId": 868024
}
]
},
{
"source": 2,
"list": []
}
]
}Query Online Information for a Specific WhatsApp Account
Type
API
URI
/group-dispatch-api/user/queryWhatsAppInfo
Request Method
POST、Content-Type: application/json
API Description
Query online information for the specified WhatsApp account (only returns online)
Request Parameter Description
| Field | Type | Required | Remarks |
|---|---|---|---|
| int | Yes | WhatsApp account | |
| source | int | No | Source. If not provided, query pc and mobile by default. When source is 3, query the cloud computer scenario |
Request example:
{
"source": 3,
"whatsapp": 8618217331412
}Response Parameter Description
Parameter Name Type Remarks code int Status code message String Description data List Data
data Response Parameter Description
| Parameter Name | Type | Remarks |
|---|---|---|
| userId | int | Agent id |
| agentAccount | String | Agent account |
| String | WhatsApp number | |
| source | int | 1、pc 2、mobile 3、cloud computer |
- Response Example
{
"code": 200,
"message": "Success ",
"data": {
"agentAccount": "202503101",
"whatsApp": "8618217331411",
"source": 1,
"userId": "868024"
}
}Query Online Status Logs for Agents (WhatsApp Accounts)
Type
API
URI
/group-dispatch-api/user/queryUserStatusLog
Request Method
POST、Content-Type: application/json
API Description
Query online status logs for agents (WhatsApp accounts) (latest 50 records)
Request Parameter Description
| Field | Type | Required | Remarks |
|---|---|---|---|
| agentAccount | String | No | Agent account (if not provided, query all agents) |
| String | No | WhatsApp account | |
| source | int | Yes | Source: 1pc, 2 mobile |
Request example:
{
"agentAccount": "",
"whatsApp": "573125704139",
"source": 2
}Response Parameter Description
Parameter Name Type Required Remarks code int Yes Status code message String Yes Description data List Yes Data
data Response Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| userId | int | Yes | Agent id |
| agentAccount | String | Yes | Agent account |
| whatsAppList | List | Yes | WhatsApp account list (max 50 entries) |
whatsAppList Response Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| String | Yes | ||
| name | String | No | Nickname |
| status | int | Yes | Status: 10 online, 20 disconnected, 30 offline, 40 banned |
| source | int | Yes | Source: 1pc, 2 mobile |
| countryCode | String | Yes | Country |
| detailStatus | int | Yes | Behavior type |
| createTime | int | Yes | Create time |
Behavior type code mapping
| code | Description |
|---|---|
| 11 | PC QR code login |
| 12 | PC online |
| 13 | Mobile online |
| 21 | PC disconnected |
| 22 | Mobile disconnected |
| 31 | PC closed customer service account offline |
| 32 | PC closed client offline |
| 33 | PC triggered monitoring offline |
| 34 | Mobile deleted offline |
| 35 | Mobile actively exited offline |
| 36 | Mobile triggered monitoring offline |
| 37 | Mobile abnormal offline |
| 41 | PC banned |
| 42 | Mobile banned |
| 43 | System marked as permanently banned |
- Response Example
{
"code": 200,
"message": "Success",
"data": [
{
"userId": 621443,
"agentAccount": "lsl001",
"whatsAppList": [
{
"whatsApp": "573125704139",
"name": "",
"status": 20,
"source": 2,
"countryCode": "哥伦比亚",
"detailStatus": 42,
"createTime": "2024-07-08 19:25:31"
}
]
}
]
}Query the Status of Recently Online WhatsApp Accounts for an Agent (Latest Ten Records)
Type
API
URI
/group-dispatch-api/user/getLatestOnlineWhatsAccount
Request Method
POST、Content-Type: application/json
API Description
Query the status of recently online WhatsApp accounts for an agent (latest ten records)
Request Parameter Description
| Field | Type | Required | Remarks |
|---|---|---|---|
| userId | int | No | Agent id (if not provided, query all agents) |
| source | int | Yes | Source: 1pc, 2 mobile |
Request example:
{
"userId": 621443,
"source": 1
}Response Parameter Description
Parameter Name Type Required Remarks code int Yes Status code message String Yes Description data List Yes Data
data Response Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| userId | int | Yes | Agent id |
| agentAccount | String | Yes | Agent account |
| whatsAppList | List | Yes | WhatsApp account list |
whatsAppList Response Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| String | Yes | ||
| name | String | No | Nickname |
| status | int | No | Status: 10 online, 20 disconnected, 30 offline, 40 banned |
- Response Example
{
"code": 200,
"message": "Success ",
"data": [
{
"agentAccount": "lsl001",
"whatsAppList": [
{
"whatsApp": "234567892",
"name": "zhang",
"status": 10
}
],
"userId": 621443
}
]
}