I followed the basic guide to the Box API, and I get 404 errors when trying to request any folder. (either the root folder or one created to confirm "any")
Here is what I did, I changed my API keys and email address, etc. (I apologize for any oddities because the markup / XML / JSON is inserted!) I tried to clarify the situation without wasting time reformatting everything)
First I generated my API key. Then:
curl https://www.box.com/api/1.0/rest?action=get_ticket\&api_key=uoun62sm0baxyx53hdzgq9csc5fgJJJJ
<?xml version='1.0' encoding='UTF-8' ?>
<response><status>get_ticket_ok</status>
<ticket>kgof13pk1qq8ls6m2exi8vlupausJJJJ</ticket>
</response>
Then go to:
https://www.box.com/api/1.0/auth/kgof13pk1qq8ls6m2exi8vlupausJJJJ
Log in as a user ( max@hotmail.com ), then return to the command line:
curl https://www.box.com/api/1.0/rest?action=get_auth_token\&api_key=uoun62sm0baxyx53hdzgq9csc5fgJJJJ\&ticket=kgof13pk1qq8ls6m2exi8vlupausJJJJ
This returns me an authentication token:
<response><status>get_auth_token_ok</status>
<auth_token>9pqiii88obks0gg9kqtdcfq799bhJJJJ</auth_token>
<user><login>max@hotmail.com</login><email>max@hotmail.com</email>
<access_id>180987265</access_id><user_id>180987265</user_id><space_amount>5368709120</space_amount><space_used>68616595</space_used><max_upload_size>104857600</max_upload_size><sharing_disabled/></user></response>
, API :
curl https://www.box.com/api/2.0/folders/FOLDER_ID \
-H "Authorization: BoxAuth api_key=uoun62sm0baxyx53hdzgq9csc5fgJJJJ&auth_token=9pqiii88obks0gg9kqtdcfq799bhJJJJ"
:
{"type":"error","status":404,"code":"not_found","help_url":"","message":"Unknown Error","request_id":"8614183014fa10d5bcf63b"}
, -, - , ...?
,