简体   繁体   中英

Office365 Unified Api - Share file with specific user and get file thumbnail

I am trying to do the following two things:
- Share file with specific user
- Get thumbnail for a file

I am currently using the Office 365 Unified Api and I'd like to keep it that way if possible.

I thought it would be possible to get the thumbnails for a file like this:

"https://<tenant>.sharepoint.com/_api/v1.0/me/files/" + id + "/thumbnails"

This returns the following error

{
  "code": "-1, Microsoft.SharePoint.Client.InvalidClientQueryException",
  "message": "The expression drive/items/<id>/thumbnails is not valid."
}

As for the file sharing, I have no idea where to start. I hope someone can help me out with this, thanks in advance.

The thumbnails feature is available in the v2 of the Files API - please refer to https://dev.onedrive.com/items/thumbnails.htm . The feature to share file with a specific user will be available in this API by the end of the month.

You can find the complete documentation at http://dev.onedrive.com . This API is currently in preview, and general availability is planned to happen before the end of the year. Please note that all new features and fixes are being added to the v2 API.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM