拒绝访问在Onedrive

时间:2016-03-11 10:38:29

标签: php api onedrive

我收到此错误:

  

{“error”:{“code”:“accessDenied”,“message”:“拒绝访问”}}

每次我使用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 post,body是json编码的:

$data = json_encode(array("name"=>"".$title,"folder"));

请帮我解决我的问题。 :(

1 个答案:

答案 0 :(得分:0)

我只需创建要作为字符串而不是数组传递给url的数据。这解决了我的问题。谢谢大家。

相关问题