I want the user to upload to our server and have our server then upload the file to a specific folder in Box using the API. How can I do this? What credentials should I use?
curl https://app.box.com/api/oauth2/token \
-d 'grant_type=client_credentials&client_id=CLIENT_ID&client_secret=SECRET'
returns
{"access_token":"TOKEN","expires_in":3793,"restricted_to":[],"token_type":"bearer"}
curl https://upload.box.com/api/2.0/files/content \
-H "Authorization: Bearer TOKEN" -X POST -F \
[email protected] -F folder_id=3306197480
returns
{"type":"error","status":404,"code":"not_found","context_info":{"errors":[{"reason":"invalid_parameter","name":"parent","message":"Invalid value 'd_3306197480'. 'parent' with value 'd_3306197480' not found"}]},"help_url":"http://developers.box.com/docs/#errors","message":"Not Found","request_id":"1157604954550c7c754b9c9"}