Skip to main content
Question

Accessing Box API without user logging in (normal "API token" approach)

  • May 21, 2025
  • 3 replies
  • 2 views

Forum|alt.badge.img

I'm trying to write an app that will hit the API to retrieve usage data. I don't want to have a UI and require a user to login. I want the app to have a credential, server-side, that it uses to access the API, then render the data as JSON.

 

I assumed this is how it would work but apparently not.

https://github.com/box/box-java-sdk/blob/master/doc/authentication.md

https://docs.box.com/docs/oauth-20

 

I don't see how I can directly use my client_id and secret to access the API directly, rather, it wants me to let the user login.

Can this be done?

3 replies

Forum|alt.badge.img

JWT by-passes the normal login flow and you can make api calls - https://docs.box.com/docs/app-auth

 


Forum|alt.badge.img

Ah this looks perfect! Thanks!


Forum|alt.badge.img

what is the request format to send the downloaded json to get access token