Get Folder Items api on a public shared folder returns "not_found"
Hi fellow devs,
I have a public shared box folder: https://app.box.com/s/yje0erch79v03z4nebsraq4yt2qsplvm
From this I assumed that the folder id is "yje0erch79v03z4nebsraq4yt2qsplvm". (no?)
Then, I tried to list this folder using the box api sample like this:
curl "https://api.box.com/2.0/folders/yje0erch79v03z4nebsraq4yt2qsplvm/items?limit=2&offset=0" -H "Authorization: Bearer 3RRYMD6ha4nec1fzKJxs1EousyfkcIQj"
But the return is not_found:
{"type":"error","status":404,"code":"not_found","help_url":"http:\/\/developers.box.com\/docs\/#errors","message":"Not Found","request_id":"m91igjfp1ae8i5oh"}
Thanks.
-- J
-
The shared link URL is not the folder ID — it is a randomly generated string used to allow access to the folder. To clarify, you could remove the shared link from the folder and then generate a new one, which would give you a different shared link URL, but would not change the folder ID.
To access an item via a shared link in the API, you would use the Shared Items endpoint with the BoxApi header.
サインインしてコメントを残してください。
コメント
1件のコメント