This API should be called on the server side and cannot be called directly on the client side (Mini Program, web page, APP, etc.). For details, please refer to API Call Guide.
API English Name: removeIotGroupDevice
This API is used to remove devices that have been added to a device group.
1. Call Method
HTTPS Call
POST https://api.weixin.qq.com/wxa/business/group/removedevice?access_token=ACCESS_TOKEN
Cloud Call
- This API does not support cloud call.
Third-party Call
- This API does not support third-party platform calls.
2. Request Parameters
Query Parameters Query String Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| access_token | string | Yes | API call credential, you can use access_token |
Request Body Request Payload
| Parameter | Type | Required | Description |
|---|---|---|---|
| group_id | string | Yes | The unique identifier of the device group. |
| device_list | objarray | Yes | List of devices. |
Body.device_list(Array) Object Payload
List of devices.
| Parameter | Type | Required | Description |
|---|---|---|---|
| model_id | string | Yes | Device model ID. Obtained by registering the device on the WeChat Official Platform. |
| sn | string | Yes | Unique device serial number. Assigned by the manufacturer. |
3. Response Parameters
Response Body Response Payload
| Parameter | Type | Description |
|---|---|---|
| errcode | number | Error code. |
| errmsg | string | Error message. |
| device_list | objarray | List of devices. |
Res.device_list(Array) Object Payload
List of devices.
| Parameter | Type | Description |
|---|---|---|
| model_id | string | Unique identifier of the device model. |
| sn | string | Unique identifier of the device. |
| errcode | number | Error code. |
4. Notes
No special notes for this API
5. Code Example
Request Example
{
"group_id": "GROUP_ID",
"device_list": [
{
"model_id": "MODEL_ID1",
"sn": "SN1"
},
{
"model_id": "MODEL_ID2",
"sn": "SN2"
}
]
}
Response Example
{
"errcode": 0,
"errmsg": "ok",
"device_list": [
{
"model_id": "MODEL_ID1",
"sn": "SN1",
"errcode": 0
},
{
"model_id": "MODEL_ID2",
"sn": "SN2",
"errcode": 0
}
]
}
6. Error Codes
The following is the error code list of this API, other error codes can refer to Common Error Codes; When encountering errors in calling the API, you can use the official API Diagnostic Tool to assist in locating and analyzing problems.
| Error Code | Error Description | Solution |
|---|---|---|
| 43002 | require POST method | Method call error. Please use the POST method to call this API. |
| 44002 | empty post data | The POST data packet is empty. The body parameter of the POST request cannot be empty. |
| 47001 | data format error | Error parsing JSON/XML content; missing parameters in the POST data; parameters must be written as a JSON string in the body of the POST request. Please check and correct, then retry. |
| 9800013 | Invalid `group_id`. | Check the `group_id`. |
| 9800017 | This device does not belong to the device group. | Check whether the device has been added to the device group. |
7. Applicable Scope
The callable account types for this API are not yet clear, or are determined by the calling parameters in business. Please refer to the actual calling situation.