rto*_*tom 2 azure onedrive microsoft-graph
我正在尝试通过API在OneDrive上创建新文件夹,但出现异常
致命错误:错误消息“ League \ OAuth2 \ Client \ Provider \ Exception \ IdentityProviderException”未捕获,必须提供以下方面之一才能创建项目:Bundle,File,Folder,RemoteItem
这是与$a = ["name" => "Folder"];
。
如果我将其更改为:
$a = ["name" => "Folder", "folder" => array()];
$this->provider->post('https://graph.microsoft.com/v1.0/me/drive/root/children',$a,$_SESSION['access_token']);
Run Code Online (Sandbox Code Playgroud)
然后我得到
有效负载中的属性文件夹的值与架构不匹配
从示例页面中,我假设该folder
值应为空数组。
文件夹的正确格式为
$folderParameters = ["name" => $folderName, "folder" => ["childCount" => '0']];
归档时间: |
|
查看次数: |
788 次 |
最近记录: |