I want to create project with Microsoft Cognitive Services working with Onedrive API.
Scenario is : User will give me an Onedrive link and my API will go files on that folder.
Is it possible?
If so, where can I find more documentation about it?
You'll want to leverage the shares
API using an encoded version of the OneDrive Link.
GET ../v1.0/shares/{sharingTokenOrUrl}
Where sharingTokenOrUrl
in your case is the URL encoded in the following manner:
As an example, to encode a URL in C#:
string sharingUrl = "https://onedrive.live.com/redir?resid=1231244193912!12&authKey=1201919!12921!1";
string base64Value = System.Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(sharingUrl));
string encodedUrl = "u!" + base64Value.TrimEnd('=').Replace('/','_').Replace('+','-');
Check out this documentation for a complete description of the shares
endpoint.