WhatsApp Account Management
WhatsApp Account Management
Wake Up Friend Contact Chat Conversation Interface
URI
/wscrm-bus-api/open/action/batchAdd
Request Method
POST、Content-Type: application/json
Description
To perform the opened action, you must ensure that both the account and the customer service (WhatsApp) account are logged in. If not logged in after 1 minute, the action fails automatically.
When opening different friend conversations with the same account and WhatsApp customer service account, open them sequentially with 10s intervals.
Request Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| tenantId | Long | Yes | Company id |
| data | List | Yes | Detail data |
data Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| agentAccount | String | Yes | Agent account |
| whatsId | String | No | WhatsApp account. If not provided, the currently logged-in WhatsApp accounts of this client will be listed, and you can choose one as the WhatsApp account. |
| friendWhatsId | String | Yes | Friend WhatsApp |
| platformType | int | Yes | Device type: 1 pc, 2 android |
| content | String | No | Message content |
| type | int | Yes | Business type: 1 opens the friend conversation window |
- Request Example
{
"tenantId": 500766,
"data": [
{
"agentAccount": "test",
"whatsId": "13633802288",
"friendWhatsId": "8613633800088",
"platformType": 1,
"content": "hello",
"type": "1"
}
]
}- Response Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| code | int | Yes | Response code |
| message | String | Yes | Response message |
| data | String | Yes | Unique callback identifier (consistent with the add order) |
- Response Example
{
"code": 200,
"message": "Success",
"data": ["20c7c02bf11b494286dd165da47388c9"]
}Query Wake-up Friend Contact Execution Detail API
URI
/wscrm-bus-api/open/action/callbackResult
Request Method
POST、Content-Type: application/json
Request Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| tenantId | Long | Yes | Company id |
| data | List | Yes | Queried ids |
- Request Example
{
"tenantId": 500766,
"data": ["ad518a4271fa43c8937612c5f60396f8"]
}- Response Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| id | String | Yes | DataUnique identifier |
| tenantId | Long | Yes | Company id |
| agentAccount | String | Yes | Agent account |
| whatsId | String | Yes | Customer service account |
| friendWhatsId | String | Yes | Friend WhatsApp |
| type | int | Yes | Action type: 1 open client-side agent chat window |
| executeStatus | String | Yes | Execution result: 0 not executed, 1 success, 2 failed |
| executeTime | String | Yes | Execution time (default '1970-01-01 08:00:01') |
- Response Example
{
"code": 200,
"message": "Success",
"data": [
{
"id": "ad518a4271fa43c8937612c5f60396f8",
"tenantId": 500766,
"agentAccount": "ykts02",
"whatsId": "8172727272727",
"friendWhatsId": "8261626162626",
"type": 1,
"executeStatus": 2,
"executeTime": "1970-01-01 08:00:01"
}
]
}Customer Service Account Online/Offline Async Notification API
Note: API encryption rules use HTTP headers.
Configuration ID <WA_SYNC_ON_OR_OFF_LINE_STATUS>
WebHook
URI
/api/callback/whatsapp/onlineStatus
Request Method
POST、Content-Type: application/json
Request Parameter Description
| Field | Type | Required | Remarks |
|---|---|---|---|
| whatsAppList | List | Yes | Format: [{}, {}], see details below (0-50 records) |
- whatsAppList Parameter Description
| Field | Type | Required | Remarks |
|---|---|---|---|
| whatsId | String | Yes | WhatsApp phone number |
| status | int | Yes | Status: 10 online, 20 disconnected, 30 offline, 40 banned |
| detailStatus | int | Yes | Detail status (see notes below) |
| account | String | Yes | Agent account |
| platformType | int | Yes | Platform type: 1 PC, 2 Android |
| time | String | Yes | Time, e.g. 2024-06-27 19:52:12 |
Detail status: 11 PC QR login, 12 PC online, 21 PC disconnected, 31 PC close account offline, 32 PC close client offline, 33 PC monitor-triggered offline, 41 banned
- Request Example
[
{
"whatsId": "8617633819542",
"status": 1,
"detailStatus": 11,
"account":"",
"time":"2024-07-03 15:27:00",
"platformType":1
},
{
"whatsId": "8617633819542",
"status": 1,
"detailStatus": 11,
"account":"",
"time":"2024-07-03 15:27:00",
"platformType":1
}
]
}- Response Example
{
"code": 200,
"message": "Success",
"data": ""
}Customer Service Account Operations
Batch Import Customer Service Accounts
- Type
API
URI
/group-dispatch-api/whatsapp/batchInsert
Request Method
POST、Content-Type: application/json
API Description
Batch import customer service accounts
Request Parameter Description
| Field | Type | Required | Remarks |
|---|---|---|---|
| whatsAppList | List | Yes | Customer service account list |
data Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| String | Yes | ||
| avatar | String | No | Avatar |
| name | String | No | Name |
| publicKey | String | Yes | Account public key |
| privateKey | String | Yes | Account private key |
| msgPublicKey | String | Yes | Message public key |
| msgPrivateKey | String | Yes | Message private key |
| accountId | String | Yes | Account id |
| nextKeyId | String | No | nextKeyId |
| registrationId | String | No | Registration id |
| deviceParams | String | No | Device parameters |
| whatsappType | Integer | No | WhatsApp account type: 1 personal, 2 business; default personal |
- Request Example:
{
"whatsAppList": [
{
"whatsApp": "861821726232",
"whatsappType": 1,
"name": "lee",
"avatar": "wwww.baiux.com/1.img",
"publicKey": "",
"privateKey": "",
"msgPublicKey": "",
"msgPrivateKey": "",
"accountId": "",
"nextKeyId": "",
"registrationId": "",
"deviceParams": ""
}
]
}Response Parameter Description
Parameter Name Type Required Remarks code int Yes Status code message String Yes Description data String Yes Data Response Example
{
"data": "",
"code": 200,
"message": "success"
}Query Customer Service Account Information
Type
API
URI
/group-dispatch-api/whatsapp/queryWhatsAppStatus
Request Method
GET、Content-Type: application/json
API Description
Query all customer service account information
Request Parameter Description
None
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 |
|---|---|---|---|
| String | Yes | ||
| status | int | Yes | Status: 1 normal, 2 banned |
| onlineStatus | int | Yes | Online status: 1 logging in, 2 online, 3 logging out, 4 offline |
- Response Example
{
"data": [
{
"whatsApp": "861821371272",
"status": 1,
"onlineStatus": 1
}
],
"code": 200,
"message": "success"
}Batch Online Customer Service Accounts
Type
API
URI
/group-dispatch-api/whatsapp/batchOnline
Request Method
POST、Content-Type: application/json
API Description
Batch online customer service accounts
Request Parameter Description
| Field | Type | Required | Remarks |
|---|---|---|---|
| whatsAppList | List | Yes | Customer service account list |
- whatsAppList Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| override | boolean | Yes | Whether to override |
| String | Yes | ||
| avatar | String | No | Avatar |
| name | String | No | Name |
| publicKey | String | Yes | Account public key |
| privateKey | String | Yes | Account private key |
| msgPublicKey | String | Yes | Message public key |
| msgPrivateKey | String | Yes | Message private key |
| nextKeyId | String | No | nextKeyId |
| registrationId | String | No | Registration id |
| accountId | String | No | Account id |
| deviceParams | String | No | Device parameters |
| whatsappType | Integer | No | WhatsApp account type: 1 personal, 2 business; default personal |
- Request Example:
{
"whatsAppList": [
{
"whatsApp": "861821726232",
"whatsappType": 1,
"override": false,
"name": "lee",
"avatar": "wwww.baiux.com/1.img",
"publicKey": "",
"privateKey": "",
"msgPublicKey": "",
"msgPrivateKey": "",
"accountId": "",
"nextKeyId": "",
"registrationId": "",
"deviceParams": ""
}
]
}Response Parameter Description
Parameter Name Type Required Remarks code int Yes Status code message String Yes Description data String Yes Data Response Example
{
"data": "",
"code": 200,
"message": "success"
}Batch Recycle Customer Service Accounts
Type
API
URI
/group-dispatch-api/whatsapp/batchRecycle
Request Method
POST、Content-Type: application/json
API Description
Batch recycle customer service accounts
Request Parameter Description
| Field | Type | Required | Remarks |
|---|---|---|---|
| whatsAppList | List | No | Customer service account |
- Request Example:
{
"whatsAppList": ["861821726232", "861821726231"]
}Response Parameter Description
Parameter Name Type Required Remarks code int Yes Status code message String Yes Description data String Yes Data Response Example
{
"data": "",
"code": 200,
"message": "success"
}Sync Customer Service Account Status
Configuration ID <CHANNEL_SYNC_STATUS>
Type
WebHook
URI
/callback/gsTask/syncWhatsAppStatus
Request Method
POST、Content-Type: application/json
API Description
Sync customer service account status
Request Parameter Description
| Field | Type | Required | Remarks |
|---|---|---|---|
| String | Yes | Customer service account | |
| status | int | Yes | Status: 1 normal, 2 banned |
| onlineStatus | int | Yes | Online status: 1 logging in, 2 online, 3 logging out, 4 offline |
| reason | String | No | Failure reason |
| instanceCode | String | No | QR scan id |
- Request Example:
{
"whatsApp": "8218132718231",
"status": 1,
"onlineStatus": 1,
"reason": "",
"instanceCode": ""
}Response Parameter Description
Parameter Name Type Required Remarks code int Yes Status code message String Yes Description data String Yes Data Response Example
{
"data": "",
"code": 200,
"message": "success"
}reason (error reason) description
code Description 1001 Pairing failed, QR scan required again 1002 Network error, change IP required 1003 Pair code generated too frequently 1004 Logged out
Customer Service Account Registration
Customer Service Account Registration (Submit Phone Number)
- Type
API
URI
/group-dispatch-api/register/submitPhone
Request Method
POST、Content-Type: application/json
API Description
Customer service account registration
Request Parameter Description
| Field | Type | Required | Remarks |
|---|---|---|---|
| phone | String | Yes | Customer service account (phone number) |
| verifyType | int | Yes | Verification type: 0 SMS, 1 voice, 2 missed call, 3 internal code |
| accountType | int | Yes | Account type: 1 personal, 2 business |
| areaCode | String | Yes | Area code |
| countryCode | String | Yes | Country code |
- Request Example:
{
"phone": "182172623211",
"verifyType": 1,
"accountType": 2,
"areaCode": "+86",
"countryCode": "CN"
}Response Parameter Description
Parameter Name Type Required Remarks code int Yes Status code message String Yes Description data int Yes Task id Response Example
{
"data": 12,
"code": 200,
"message": "success"
}Customer Service Account Registration (Submit Verification Code)
- Type
API
URI
/group-dispatch-api/register/submitVerifyCode
Request Method
POST、Content-Type: application/json
API Description
Customer service account registration(Verification code)
Request Parameter Description
| Field | Type | Required | Remarks |
|---|---|---|---|
| phone | String | Yes | Customer service account (phone number) |
| areaCode | String | Yes | Area code |
| verifyCode | String | Yes | Verification code |
- Request Example:
{
"phone": "1821726232",
"verifyCode": "123456",
"areaCode": "+86"
}Response Parameter Description
Parameter Name Type Required Remarks code int Yes Status code message String Yes Description data String Yes Data Response Example
{
"data": "",
"code": 200,
"message": "success"
}Sync Customer Service Account Registration Status
Configuration ID <CHANNEL_REGISTER_STATUS>
Type
WebHook
URI
/group-dispatch-api/register/syncStatus
Request Method
POST、Content-Type: application/json
API Description
Sync customer service account registration status
Request Parameter Description
| Field | Type | Required | Remarks |
|---|---|---|---|
| phone | String | Yes | Customer service account (phone number) |
| status | int | Yes | 1 success, 0 failed |
- Request Example:
{
"phone": "861821726232",
"status": "1"
}Response Parameter Description
Parameter Name Type Required Remarks code int Yes Status code message String Yes Description data String Yes Data Response Example
{
"data": "",
"code": 200,
"message": "success"
}Customer Service Account QR Code
Get Pairing Targets
URI
group-dispatch-api/qrCode/selectPairTarget
Request Method
GET、Content-Type: application/json
Request Parameter Description
Request Example
- Response Example
{
"code": 200,
"message": "Success",
"data": [
{
"createTime": "2025-11-05 16:22:07",
"targetTenantName": "xxxx",
"targetTenantId": 10085
},
{
"createTime": "2025-11-21 10:50:37",
"targetTenantName": "yyyy",
"targetTenantId": 10086
}
]
}- Response Parameter Description
| Parameter Name | Type | Remarks |
|---|---|---|
| targetTenantId | int | Pairing target id |
| targetTenantName | String | Pairing target account |
| createTime | String | Create time |
Get QR Code Window ID API
URI
/group-dispatch-api/qrCode/preGenerate
Request Method
POST、Content-Type: application/json
Request Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| type | int | Yes | Type: 1 PC, 2 cloud PC |
| target | int | No | Pairing target id |
- Request Example
{
"type": 1,
"target": 10085
}- Response Example
{
"code": 200,
"message": "Success",
"data": "ad518a4271fa43c8937612c5f60396f8"
}Note: Each request pre-allocates a port. The port is locked for 10 minutes; if unused or login fails, the port is released.
Get QR Code API
URI
/group-dispatch-api/qrCode/getQrCode
Request Method
POST、Content-Type: application/json
Request Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| id | String | No | Unique identifier |
| ipConfig | String | No | IP config. Currently only SOCKS5 is supported |
- Request Example
{
"id": "ad518a4271fa43c8937612c5f60396f8",
"ipConfig": "ip:port:user:pass"
}- Response Example
{
"code": 200,
"message": "Success",
"data": "2@BBisWIG5D2RkAqYI5NhFXG+Mrw/EZGU70YTyammI/3Q/nx4O3e6QNIn4PXYMWfgoO/Hb4CIi7y9G2JXeRAiVloK/QgEM9unZVX8=,1b1JxI522MIxZxMLjhOuE/A5ys2I/hvj7iMWK7ZPSm0=,iSMi+zxKjva1DMVogyRZ/TTOlx1UaLed4fQllsILvDw=,xDt9ykte3QQmklrdLQqgtH6V1NhYM14NhxXfb2UZE3Y=,1"
}Get QR Code or Pair Code API
URI
/group-dispatch-api/qrCode/getQrCodeV2
Request Method
POST、Content-Type: application/json
Request Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| id | String | Yes | Unique identifier |
| phone | String | Yes | Mobile WhatsApp account |
| ipConfig | String | No | IP config: only SOCKS5 is supported; passed value defaults to available IP |
| isEasy | String | No | Default is 88888888: pass n for native mode, y for easy mode (PPPP-1111), b for fixed eight 8s |
- Request Example
{
"id": "ad518a4271fa43c8937612c5f60396f8",
"phone": "8618733334444",
"ipConfig": "ip:port:user:pass"
}- Response Example
{
"code": 200,
"message": "Success",
"data": {
"qrcode": "2@BBisWIG5D2RkAqYI5NhFXG+Mrw/EZGU70YTyammI/3Q/nx4O3e6QNIn4PXYMWfgoO/Hb4CIi7y9G2JXeRAiVloK/QgEM9unZVX8=,1b1JxI522MIxZxMLjhOuE/A5ys2I/hvj7iMWK7ZPSm0=,iSMi+z=,1",
"pairCode": "IVEA_IPON"
}
}QR Code Status Sync API
WebHook
Configuration ID <WA_SYNC_QR_LOGIN_STATUS>
URI
/wscrm-bus-api/open/qrCode/syncLoginStatus
Request Method
POST、Content-Type: application/json
Request Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| id | String | Yes | Unique identifier |
| String | No | WhatsApp account | |
| status | int | Yes | Status: 0 failed, 1 success |
- Request Example
{
"id": "ad518a4271fa43c8937612c5f60396f8",
"whatsapp": "817272727272",
"status": 1
}- Response Example
{
"code": 200,
"message": "Success",
"data": ""
}Get QR Code Information API
URI
/group-dispatch-api/qrCode/getQrCodeInfo
Request Method
POST、Content-Type: application/json
Request Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| id | String | No | Unique identifier |
| String | No | WhatsApp account |
- Request Example
{
"id": "ad518a4271fa43c8937612c5f60396f8"
}- Response Parameter Description
| Parameter Name | Type | Remarks |
|---|---|---|
| status | int | Status: 0 not logged in (QR scan failed), 1 logged in (QR scan successful) |
| String | WhatsApp account | |
| userName | String | Agent name |
- Response Example
{
"code": 200,
"message": "Success",
"data": [
{
"status": 1,
"userName": "test",
"whatsApp": "812282828221"
}
]
}Customer Service Account Online API
URI
/group-dispatch-api/qrCode/onLine
Request Method
POST、Content-Type: application/json
Request Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| id | String | Yes | Unique identifier |
| ipConfig | String | No | IP config. Currently only SOCKS5 is supported |
- Request Example
{
"id": "ad518a4271fa43c8937612c5f60396f8",
"ipConfig": "ip:port:user:pass"
}- Response Example
{
"code": 200,
"message": "Success",
"data": []
}Customer Service Account Offline API
URI
/group-dispatch-api/qrCode/offline
Request Method
POST、Content-Type: application/json
Request Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| id | String | Yes | Unique identifier |
- Request Example
{
"id": "ad518a4271fa43c8937612c5f60396f8"
}- Response Example
{
"code": 200,
"message": "Success",
"data": []
}Customer Service Account Logout API
URI
/group-dispatch-api/qrCode/logOut
Request Method
POST、Content-Type: application/json
Request Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| id | String | Yes | Unique identifier |
- Request Example
{
"id": "ad518a4271fa43c8937612c5f60396f8"
}- Response Example
{
"code": 200,
"message": "Success",
"data": []
}Get Current User Total Ports and Used Ports
URI
/group-dispatch-api/qrCode/selectCloudPort
Request Method
GET、Content-Type: application/json
Response Example
{
"code": 200,
"message": "Success",
"data": {
"currentPort": 3,
"maxPort": 2
}
}- Response Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| currentPort | int | Yes | Current occupied port count |
| maxPort | int | Yes | Maximum available port quota |
Note: When max ports are less than current occupied ports, accounts on later requested ports will be taken offline.
Query Current Occupied Port Details
URI
/group-dispatch-api/qrCode/selectCloudPortDetail
Request Method
GET、Content-Type: application/json
Response Example
{
"code": 200,
"message": "Success",
"data": [
{
"phone": "8618730334344",
"createTime": "2025-07-31 15:40:19",
"id": 8639164839053938688,
"status": 10
},
{
"phone": "8618730334345",
"createTime": "2025-09-10 16:07:25",
"id": 8654029561952415744,
"status": 20
},
{
"phone": null,
"createTime": "2025-09-10 16:07:42",
"id": 8654029632861319168,
"status": null
}
]
}- Response Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| phone | String | No | WA number |
| createTime | string | Yes | Port application time |
| id | String | Yes | Port application id |
| status | int | No | Phone number status: 10 online, 20 disconnected |
Note: Use occupied ports promptly after applying, otherwise port quota remains occupied.
Query Current Cloud Port Address Book
Note: This operation may trigger risk control.
URI
/group-dispatch-api/qrCode/selectContact?id=xxx
Request Method
GET、Content-Type: application/json
Request Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| id | String | No | Unique identifier |
- Response Example
{
"code": 200,
"message": "Success",
"data": [
{
"whatsapp": "8618733334444",
"pushName": "Ryan yu",
"isFriend": false,
"firstName": "",
"fullName": ""
},
{
"whatsapp": "8618733334444",
"pushName": "Ryan yu",
"isFriend": false,
"firstName": "",
"fullName": ""
}
]
}- Response Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| String | Yes | WA number | |
| pushName | string | No | WA nickname |
| isFriend | String | Yes | whether it is a contact |
| firstName | String | No | Contact last name |
| fullName | String | No | Contact first name |
Query Current Cloud Port Contact Information
Note: This operation may trigger risk control.,and does not distinguish real contacts
URI
/group-dispatch-api/qrCode/contact/info
Request Method
POST、Content-Type: application/json
Request Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| id | String | Yes | Unique identifier |
| phone | String | Yes | Expected contact phone number |
- Request Example
{
"id": "ad518a4271fa43c8937612c5f60396f8",
"phone": "8618733334444"
}- Response Example
{
"code": 200,
"message": "Success",
"data": {
"whatsapp": "8618733334444",
"pushName": "Ryan yu",
"isFriend": false,
"firstName": "",
"fullName": ""
}
}- Response Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| String | Yes | WA number | |
| pushName | string | No | WA nickname |
| isFriend | String | Yes | whether it is a contact |
| firstName | String | No | Contact last name |
| fullName | String | No | Contact first name |
Query Current WhatsApp Profile Information
Note: If avatar exists, URL is available; it is valid for a period after login and may expire later (decided by WhatsApp).
URI
/group-dispatch-api/qrCode/info/profile
Request Method
POST、Content-Type: application/json
Request Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| id | String | Yes | Unique identifier |
- Request Example
{
"id": "ad518a4271fa43c8937612c5f60396f8"
}- Response Example
{
"code": 200,
"message": "Success",
"data": {
"whatsapp": "447962xxxxx",
"isBusiness": true,
"businessName": "ygfhvd",
"avatar": "https://pps.whatsapp.net/v/t61.24694-24/534427959_3710828145715675_6315457185020903046_n.jpg?ccb=11-4&oh=01_Q5Aa3wGpxN6bwVlgwn8gUeTao7xlcLxzdrV2pNGhUV-MND4ZOw&oe=69ACF821&_nc_sid=5e03e0&_nc_cat=106",
"pushName": "ygfhvd",
"status": "Nihao",
"chatNum": 11,
"groupNum": 3,
"lastChatTime": 1774339558
}
}- Response Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| String | Yes | WA number | |
| pushName | string | No | WA nickname |
| isBusiness | boolean | No | whether it is a business account |
| businessName | String | No | Business account nickname |
| avatar | String | No | WhatsApp avatar URL |
| status | String | No | Status |
| chatNum | int | No | Contact conversation count |
| groupNum | int | No | Group count |
| lastChatTime | bigint | No | Last chat time (second-level timestamp) |
Set Avatar and Nickname
Note: If avatar exists, URL is available; it is valid for a period after login and may expire later (decided by WhatsApp).
URI
/group-dispatch-api/channelInfo/updateAvatarOrNickname
Request Method
POST、Content-Type: application/json
Request Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| type | int | Yes | Type: 0 physical device, 1 cloud port; cloud port must be online to execute |
| avatar | String | No | Avatar URL must be reachable and conform to WhatsApp requirements: 16x16, 32x32, 64x64, 128x128 |
| nickname | String | No | Nickname |
| phoneList | array | Yes | Phone number |
- Request Example
{
"type": 1,
"avatar": "https://oss/3021b973ced1b3300664bb3f7a47ee8b.jpeg",
"nickname": "mimanchin",
"phoneList": ["86187303****"]
}- Response Example
{
"code": 200,
"message": "Success",
"data": ""
}- Response Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| String | Yes | WA number | |
| pushName | string | No | WA nickname |
| isBusiness | boolean | No | whether it is a business account |
| businessName | String | No | Business account nickname |
| avatar | String | No | WhatsApp avatar URL |
| status | String | No | Status |
| chatNum | int | No | Contact conversation count |
| groupNum | int | No | Group count |
| lastChatTime | bigint | No | Last chat time (second-level timestamp) |
QR Code Error Information
| code | message |
|---|---|
| 1001 | Current user cloud port quota is insufficient |
| 1002 | Current port does not exist or has been released |
| 1003 | Unsupported type |
| 1004 | Pairing target not set |
PC QR Code Scan
Create QR Scan Task API
API
URI
/wscrm-bus-api/qrCodeTask/create
Request Method
POST、Content-Type: application/json
Request Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| userId | int | No | Specify agent id; if omitted, the server auto-selects one |
| allocationRole | int | Yes | 1 random, 3 specified |
Failure Cases
Insufficient port quota, or insufficient ports for online agents.
Request Example
{
"userId": 10001,
"allocationRole": 3
}Response Example
taskId
{
"code": 200,
"message": "Success",
"data": "f0d485cb2e5e4c5ca21b74e970043e6c"
}Get QR Code by Task ID API
API
URI
/wscrm-bus-api/qrCodeTask/getQrCode
Request Method
POST、Content-Type: application/json
Request Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| taskId | String | Yes | Task id returned when creating task |
Description
Can be called repeatedly before QR scan succeeds.
Request Example
{
"taskId": "f0d485cb2e5e4c5ca21b74e970043e6c"
}- Response Example
{
"code": 200,
"message": "Success",
"data": "qr_code"
}Sync QR Scan Task Status API
WebHook
Configuration ID <SCAN_TASK_STATUS_SYNC>
URI
baseURL+uri
Request Method
POST、Content-Type: application/json
Request Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| taskId | String | Yes | Task id returned when creating task |
| userId | int | No | Agent id |
| String | No | ||
| taskStatus | int | Yes | Sync status (see below) |
| updateTime | Long | Yes | Update time (timestamp in milliseconds) |
- Sync Status Description
| Value | Remarks |
|---|---|
| 70 | QR scan succeeded |
| 71 | QR scan timeout |
| 80 | Login succeeded |
| 83 | QR code timeout not reported |
| 84 | Timeout, login not successful |
| 85 | No available port |
| 90 | Account banned |
- Request Example
{
"taskId": "f0d485cb2e5e4c5ca21b74e970043e6c",
"userId": 10001,
"taskStatus": 80,
"whatsapp": "86166666666",
"updateTime": 1710236000000
}- Response Example
{
"code": 200,
"message": "Success",
"data": ""
}