【问题标题】:Access Denied Creating a folder or item in Onedrive访问被拒绝在 Onedrive 中创建文件夹或项目
【发布时间】: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"));

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

【问题讨论】:

标签: php api onedrive


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 2018-07-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多