Skip to main content

Hi,

I'm creating a form on a website that has file uploads. I would like to send this uploads directly to Box. I'm using PHP and i'd like the uploads to be sent server-side.

 

I've created a "Custom App" and I have an Access Token. 

When I do this:

curl https://api.box.com/2.0/folders/0 -H "Authorization: Bearer MY_ACCESS_TOKEN" 

I do not see my own user's folders.  I see the App-User's folders.  It's not clear how to access just my own folder.  

 

Dropbox makes this real simple:  https://blogs.dropbox.com/developers/2014/05/generate-an-access-token-for-your-own-account/

 

It's not so simple with Box though


Hello! 


 


Thanks so much for using the Platform and Development Form! 


 


Your application needs enterprise access if you want to get the folder structure of a managed user. Also, you can use the get current user endpoint to see which user your token is associated with. This is the user id you pass into the sub-claim of the JWT assertion! 


 


Best, 


Kourtney



I thought this might be the case but was hoping it wasn't (because developers want to be lazy).  I'll give it a shot.  thanks!



Haha -- I know the feeling! Let me know if you run into any problems. Also, make sure you re-authorize your application in the apps tab of the admin console if you make changes on your configuration page!  



there wouldn't happen to be a PHP SDK in the works?



Not that I'm aware of, but I will definitely submit a feature request for us to add one for you! 



Reply