Seb James
Seb James

Reputation: 41

Folder Download URL Box API

Hope someone can help me out here

I have a folder already created on my box account that I want to fetch the download_url for,

I am making the following call:

https://api.box.com/2.0/folders/"folder_id"?fields=sync_state,shared_link 

'Authorization': 'Bearer <token_id>'

With the following parameters:

{"shared_link": {"access": "open", "permissions": {"can_preview": true, "can_download": true}}, "marked_for_sync": "synced"}

I get back:

{"type":"folder","id":"folder_id","etag":"0","sync_state":"not_synced","shared_link":{"url":"https:\/\/app.box.com\/s\/qkzyovqm0dhgt9zaluxl","download_url":null,"vanity_url":null,"is_password_enabled":false,"unshared_at":null,"download_count":0,"preview_count":0,"access":"open","permissions":{"can_download":true,"can_preview":true}}}

Why is there no download_url?

Cheers

Upvotes: 2

Views: 1504

Answers (1)

Seb James
Seb James

Reputation: 41

I lodged a ticket with Box to resolve this.

This was their reply:

The folder is not actually meant to have download url. It only happens on a file level. So if you make the call for the file with the same parameters, the download url will show up. It wont show for a folder level call.

I pointed to http://developers.box.com/docs/#folders-update-information-about-a-folder and the example response that shows a download_url that lead me on this merry chase.

Upvotes: 2

Related Questions