a ekandem
a ekandem

Reputation: 119

Box API download returning empty results

I thought this should be easy, and maybe it is, and it's just me. I want to test downloading files from my folder but getting empty html results:

$ curl -L https://api.box.com/2.0/files/f_XXXXXXXX/content \ -H "Authorization: Bearer 8wAsXXXXXXXXX"

<HEAD><TITLE>gw</TITLE>
</HEAD>
<BODY>
GW
</body>
</html>
<HEAD><TITLE>gw</TITLE>
</HEAD>
<BODY>
GW
</body>
</html>

Any idea what I may be doing wrong?

Upvotes: 0

Views: 390

Answers (2)

DiegoS
DiegoS

Reputation: 98

It's working properly for me. Command execution might be affected by local configuration file ~/.curlrc. Have you got this file? What is its content?

Upvotes: 0

Pedro Lobito
Pedro Lobito

Reputation: 98921

This should work:

curl -L https://api.box.com/2.0/files/FILE_ID/content  \
-H "Authorization: BoxAuth api_key=API_KEY&auth_token=AUTH_TOKEN"

Upvotes: 1

Related Questions