How to automatically generate a file download url as a file?

I am using box API to get metadata for files stored in a folder with folders. When I make the API call, I get all the metadata including the download url, but it is zero for all files.

I need to manually navigate to each file and then click on the share link to create the download url. Is it possible to automatically generate a download URL for a file as soon as it appears in the folder with the folder?


source to share

1 answer

You can use the API to create a download URL for each file you want to make available for download. When your app downloads metadata, it can check if a link to the download url is present. If not, then he can create a link. The url request you sent should look something like cURL:

curl -H "Authorization: Bearer AUTH_TOKEN" -d '{ "shared_link": { "access": "open" } } -X PUT


The Box API will respond with updated JSON metadata for the file, including the url. For more information see this link in the API docs:



All Articles