【发布时间】:2016-03-21 11:45:45
【问题描述】:
我收到此错误:
{"error":{"code":"accessDenied","message":"Access Denied"}}
每次我使用 onedrive api
我使用的范围是:
wl.signin,wl.offline_access, onedrive.readonly, onedrive.readwrite, onedrive.appfolder
我可以登录、注销、编辑和删除项目和文件夹,检索每个文件夹的文件,但为什么我不能添加文件夹?
这是我用来尝试添加文件夹的 api url:
https://api.onedrive.com/v1.0/drive/items/{{THE PARENT ID}}/children?nameConflict=fail
我使用 curl 帖子,正文是 json 编码的:
$data = json_encode(array("name"=>"".$title,"folder"));
请帮我解决我的问题。 :(
【问题讨论】:
-
如果文件夹已经存在,也尝试重命名文件夹:api.onedrive.com/v1.0/drive/items{{THE PARENT ID}}/children?nameConflict=rename