Skip to main content
Question

Access to my own user folder and not app-user folder

  • May 22, 2025
  • 5 replies
  • 27 views

Forum|alt.badge.img

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

5 replies

Forum|alt.badge.img

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


Forum|alt.badge.img

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!


Forum|alt.badge.img

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!  


Forum|alt.badge.img

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


Forum|alt.badge.img

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