Python调用共享脚本
Python调用共享脚本,返回10000,脚本没运行
import http.client
conn = http.client.HTTPSConnection("www.kdocs.cn")
payload = "{\"Context\":{\"argv\":{}}}"
headers = {
'Content-Type': "application/json",
'AirScript-Token': "https://www.kdocs.cn/api/v3/ide/file/ccOvddxLxI7l/script/V2-4LAg8cU8BVO4PU25kRFqC9/sync_task"
}
conn.request("POST", "/api/v3/ide/file/ccOvddxLxI7l/script/V2-4LAg8cU8BVO4PU25kRFqC9/sync_task", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
返回
{"errno":10000,"msg":"","reason":"","result":"ApiTokenNotExists"}
进程已结束,退出代码为 0
创作者俱乐部成员