[英]How can I set public folder permissions in OneDrive?
I have been using this API to list and read files from my Public folder in OneDrive personal cloud service: 我一直在使用此API从OneDrive个人云服务中的“ 公用”文件夹中列出和读取文件:
https://api.onedrive.com/v1.0/drive/items/{item-id}/children
I could simply access folder's content in C# without authentication: 我可以简单地在C#中访问文件夹的内容而无需身份验证:
using (var http = new HttpClient()) {
var json = http.GetStringAsync($"https://api.onedrive.com/v1.0/drive/items/{itemId}/children").Result;
var data = JObject.Parse(json);
...
}
This API suddenly stopped working. 该API突然停止工作。 It returns 404 status code with this content:
它返回404状态代码,其中包含以下内容:
{"error":{"code":"itemNotFound","message":"Item does not exist"}}
But the API is still working for other public folders owned by other accounts. 但是,该API仍适用于其他帐户拥有的其他公用文件夹。 For example this URL still works:
例如,此URL仍然有效:
https://api.onedrive.com/v1.0/drive/items/AB8DAAB49807BE4%21140/children
How can I set folder's permission to public ? 如何设置文件夹的公开权限? Why the API stopped working?
为什么API停止工作?
Microsoft is in a process of removing the public sharing feature. Microsoft正在删除公共共享功能。 It's been a source of confusing for end users who don't understand the difference between sharing something as public and sharing a view or edit link to a file.
对于不了解以公共方式共享内容和共享视图或编辑文件链接之间的区别的最终用户而言,这是一个令人困惑的来源。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.