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: bindKfWork
Bind WeChat Customer Service to Mini Program.
1. Call Method
HTTPS Call
POST https://api.weixin.qq.com/customservice/work/bind?access_token=ACCESS_TOKEN
Cloud Call
- This API does not support cloud call.
Third-party Call
-
This API supports third-party platforms on behalf of Merchant call.
-
The permission set ID of this API is: 161
-
After the service provider obtains one of the permission set authorizations, it can use authorizer_access_token to call on behalf of Merchant, for details please refer to Third-party Call documentation.
2. Request Parameters
Query Parameters Query String Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| access_token | string | Yes | API call credential, you can use access_token, authorizer_access_token |
Request Body Request Payload
| Parameter | Type | Required | Description |
|---|---|---|---|
| corpid | string | Yes | Enterprise ID. For instructions on how to obtain it, refer to: Term Description-corpid. |
3. Response Parameters
Response Body Response Payload
| Parameter | Type | Description |
|---|---|---|
| errcode | number | Error Code |
| errmsg | string | Error Message |
4. Notes
- The bound Enterprise ID must match the entity of Mini Program.
- Currently, only non-individual Mini Program are supported for binding.
5. Code Example
Request Example
{
"corpid": "wwee11111xxxxxxx"
}
Response Example
{
"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 |
|---|---|---|
| 0 | ok | ok |
| 10130002 | Parameter error | Check parameters |
| 10130030 | Mini Program account does not have permission | Must be a non-individual entity Mini Program |
| 10130600 | Invalid corpid | Check corpid |
| 10130601 | Invalid corpid | Check corpid |
| 10130602 | corpid does not match the entity name of Mini Program | Check corpid |
| 10130603 | Already bound | Please unbind and try again |
7. Applicable Scope
This API supports 「Mini Program」 account type calls. Other account types cannot call unless otherwise specified.