2
votes

I am trying to download the items of a shared folder following the v1.0 reference guide. I am able to retrieve the basic details by using the /v1.0/me/drive/sharedWithMe request.

sharedWithMe Response

enter image description here

However when I try and request the contents of the folder using the '/drives/remoteItem.driveId/items/id' request I get a 'itemNotFound' error code.

/drives/b!SuVijei8UUiLXWR4XeJPFe-SS3gbCDVJuXZLcatX7Ikm3BPqZMVJTLOW4rsDD7B2/items/01GB75254SYRXS4C7C25HLIWFMXFY7HWB3

"error": {
"code": "itemNotFound",
"message": "The resource could not be found.",
"innerError": {
  "request-id": "2a0591bd-6fdf-4bf8-a5f3-baca24fd1930",
  "date": "2016-08-29T14:03:25"
}

Any ideas what is going on? Thanks!

EDIT: I was able to retrieve SharedWithMe folders data by using the '/drives/remoteitem.parentReference.driveId/items/remoteItem.id/children' It seems also very important to use a scope of Files.Read.All (which seems to be currently undocumented)

1

1 Answers

0
votes

It looks like you are almost there. All you need is the /content segment.

Expected: /drives/remoteItem.parentReference.driveId/items/id/content

Your actual: /drives/remoteItem.parentReference.driveId/items/id

You'll get redirected to the resource for download. I think the documentation should be updated

And just to make sure, the base url is a bit different:

To get the shared item content: /v1.0/drives/drive-id/items/item-id/content

To get the list of shared items: /v1.0/me/drive/sharedWithMe