Search code examples
box-apibox

How to obtain file_id from "file name" in Box.com API


I am looking to use the Box.com API to download a file. Their API documentation shows that a file_id is required to call the API endpoint. However, I cannot find how to obtain the file_id. How do you obtain the file_id if all you have is the file name?

Along the same lines what if the file is located in a specific directory within the Box.com user's account. Can you obtain the file_id from a given path?


Solution

  • You can find a Box file id by searching for the file by name using the Box API Search endpoint.