Getting an external file's information via the API
I'm trying to get information on an external file which is collaborated with a user and I get a 404 not found.
I can get the information on any other file that user has access to, and I know the file exists as I can see it in the browser. What am I missing?
The call I'm using is:
curl "https://api.box.com/2.0/files/" -H "Authorization: Bearer " -H "As-User: "
-
ok, so by default a JWT app authenticates as a Service Account, not as a specific user. To authenticate as a user, either get a user access token, or use the As-User header.
When you authenticate as an actual managed Box user with access to the external file. the API call should work. By default, the Service Account would not have access to the file.
Please sign in to leave a comment.
Comments
5 comments