-
Notifications
You must be signed in to change notification settings - Fork 1
百度网盘开放平台API
Yousong Zhou edited this page Nov 8, 2023
·
7 revisions
分片上传method=create接口,md5值正确即可成功
分片上传method=create返回的md5值,是云端md5值,不是数据的md5值
分片上传method=upload返回的md5值,是分片数据的md5值
文件内容相同时,云端md5值相同,但是fs_id不同
使用dlink链接下载时,http header Content-Md5
和Etag
是数据的md5值
云端md5值,早期即数据的md5值,当前(20231026)为百度自定义的md5值。早期上传的文件,现在使用API取回的md5值与数据的md5值相等
上传接口必须使用https,否则报"no permission"
网盘API响应中表达错误的方式不统一,目前见到3种。
- 通常来自oauth相关响应:
{"error":"invalid_scope","error_description":"The requested scope is invalid"}
- 猜测来自API网关:
{"error_code":31212,"error_msg":"service unavailable"}
- 猜测来自API后端:
{"errmsg":"file does not exist","errno":31066,"request_id":"346199097945924836"}
表达“不存在”的响应
{"errno":-9,"request_id":165361853887776084} // method=list
{"errmsg":"file does not exist","errno":31066,"request_id":"346199097945924836"} // method=listall
其它收集到的错误响应
{"error":"authorization_pending","error_description":"User has not yet completed the authorization"}
{"error":"invalid_scope","error_description":"The requested scope is invalid"}
{"error":"Trigger security policy","error_description":"Please try again later"}
{"error_code":4,"error_msg":"No permission to do this operation","request_id":5888690351004390654}
{"error_code":31212,"error_msg":"service unavailable"}
{"error_code":31023,"error_msg":"param error","request_id":5929100254867189524}
{"error_code":31064,"error_msg":"file is not authorized","request_id":6110274304150775725}
{"error_code":31299, "error_msg":"[Method:Insert][Error:Expried Time Not Match][Param expired_time:1695305219 has expire]"} // method=superfile2
{"error_code":31211, "error_msg":"superfile2 upload request, transfer-encoding can't be chunked!"}
{"error_code":31297, "error_msg":"Poms key is not existing in DDBS"}
{"error_code":31061,"error_msg":"file already exists","request_id":7061246165165710235}
{"error_code":31233, "error_msg":"read request body timeout"}
{"error_code":-11015,"error_msg":"dest idc equal src idc"}
{"errmsg":"用户未登录","errno":-6,"newno":"","request_id":490053300528537920,"server_time":1695802827}
{"errno":31355,"path":""} // method=create
{"errno":12,"info":[{"errno":111,"path":"\/apps\/mypan\/my30"}],"request_id":189627738926259182} // 猜测:异步任务正执行中,不能新提交任务
{"errno":10,"path":""} // method=create
{"errno":-6,"request_id":484236624246183984} // method=ls
{"errmsg":"Invalid Bduss","errno":-6,"request_id":"484237172657202941"} // method=lsa
{"errmsg":"pcs meta error","errno":42214,"request_id":"9214843233142057956"}