# Asynchronous Task Query - Open Interface
# Configuration information
For example:
- APPID: xxxxxxxxxxxxxxx
- TOKEN: xxxxxxxxxxxxxxx
- EncodingAESKey: xxxxxxxxxxxxxxx
# Robot release progress query interface:
https://chatbot.weixin.qq.com/openapi/bts/taskfetch/{TOKEN}
Interface type:
POST request
Dxplaination of parameters:
field | type | Yes Required | describe |
---|---|---|---|
openid | string | yes | Administrator id(Can be the creator, administrator id) |
task_id | string | yes | Task ID |
Message encryption and decryption access guidelines
For example, the parameters are
<xml>
<openid><![CDATA[Platform Administrator ID]]></openid>
<task_id><![CDATA[Task ID]]></task_id>
</xml>
Encrypt the data to the field encrypt Into the body.
var cryptor = new WXBizMsgCrypt(TOKEN, EncodingAESKey, APPID)
var data = `<xml>
<openid><![CDATA[Platform Administrator ID]]></openid>
<task_id><![CDATA[Task ID]]></task_id>
</xml>`
var encrypted = cryptor.encrypt(data)
curl -X post -d '{"encrypt": encrypted}' "https://chatbot.weixin.qq.com/openapi/bts/taskfetch/{TOKEN}"
Return value:
Field name | type | meaning |
---|---|---|
data.state | int | 0 In preparation, 1 In Progress, 2 success 3 failure |
data.progress | int | Progress, n% |
data.start | int64 | Task Start Time Stamp |
data.end | int64 | End of Mission Time Stamp |
data.url | string | Download link for export task |
data.msg | string | When the state is 3, there is a task failure message |
data.success_skill_info | array | Successful skill names and ID mapping tables when importing bot, storing up to 5000 pieces, if imported in bulk, you can use the query interface to re-query the imported data |
data.fail_skill_info | array | Failed skill intent name and error message when importing bot, up to 5000 |
Return format:
{
"code": 0,
"data": {
"end": 1654847065,
"fail_skill_info": null,
"import_export_time": null,
"msg": "",
"progress": 100,
"start": 1654847065,
"state": 2,
"success_skill_info": null,
"url": ""
},
"msg": "success",
"progress_bar": "",
"request_id": "255i0ug8-l9q4-3801-44ft-w7csjn9e5142"
"type": 2
}
# Error code:
{
errcode: 1001,
errmsg: "TOKEN is not valid"
}
Error code | describe |
---|---|
1001 | Token invalid |
1002 | The robot failed the audit. |
1003 | Signature missing userid field |
1004 | Signature field is empty |
1005 | Signature expired or invalid |
1006 | Signature check failed, userid field missing |
1007 | appid, category,label, desc Field cannot be empty |
1008 | appid, openid,msg, Field cannot be empty |
1009、1011 | appid Legitimacy check failure |
1010 | appid Check failure |
1013、1019 | Request Data Decryption Failed |
1015 | managerid Legitimacy check failure |