Create a Platform App
Choose an authentication method
Box View works with any server-side authentication method. Choose the one that fits your needs.| Method | Best for | Key trait |
|---|---|---|
| Client Credentials Grant (CCG) | Most Box View use cases | Simple setup; uses client ID and a secret |
| JWT | Environments that require public/private key security | Key-pair based; no shared secret over the wire |
Migrating from a Limited Access App: CCG and JWT Platform Apps support every
endpoint that Limited Access Apps (App Token authentication) support plus 150 more. The file
upload, download, delete, and preview workflows are identical. See the Select Auth
Method guide for a full comparison.
Configure application settings
To configure your application, in the Developer Console, navigate to the Configuration tab of your application, and then set the following options:- For Application Access, select App Access Only. This restricts the application to its own Service Account content, which is the standard configuration for Box View.
- For Application Scopes, enable at least the following options:
- Read all files and folders stored in Box (root_readonly)
- Read and write all files and folders stored in Box (root_readwrite)
- If your application makes API calls from front-end browser code (for example, using Box UI Elements), add your domains to the CORS allow-list at the bottom of the Configuration tab.
- Copy your credentials from the Configuration tab:
- For CCG, copy the Client ID and the Client Secret. To view the secret, multi-factor authentication is required.
- For JWT, download the JSON config file after generating a public/private key pair.
Authorize your application
Server-authenticated Platform Apps require admin authorization before they can make API calls.- In the Developer Console, navigate to the Authorization tab.
- Click Review and Submit. Your enterprise’s Box Admin will receive an email to approve the application in the Admin Console. For more information, see the Platform App Approval guide.
Obtain an access token
The process for obtaining an access token depends on the authentication method of your application.Client Credentials Grant (CCG) authenticated Platform Apps
Request an access token by sending your client ID and secret to the token endpoint. The token authenticates as the application’s Service Account.cURL
Response
JWT authenticated Platform Apps
If your application uses JWT authentication, use the JSON config file downloaded during setup:Downscope tokens for client-side use
If you need to pass an access token to the browser (for example, to run Box Content Preview or other Box UI Elements), always downscope the token first. Downscoping exchanges a full-privilege token for a new token with restricted permissions and an optional file-level scope.cURL
| Scope | Description |
|---|---|
item_preview | Preview a file |
item_download | Download a file |
base_preview | Basic preview (Box Content Preview element) |
annotation_edit | Edit and delete annotations |
annotation_view_all | View all annotations |
Security best practices
Follow these guidelines to ensure your Platform Apps are secure:- Never expose your client secret or full access token in client-side code. Always downscope before sending tokens to the browser.
- Store credentials securely. Use environment variables or a secrets manager for your client ID, client secret, and enterprise ID.
- Keep Application Access set to App Access Only unless you specifically need enterprise-wide content access.
- Add only necessary CORS domains. Restrict the allow-list to the domains that actually make browser-side API calls.
Legacy Limited Access Apps
Limited Access Apps use App Token authentication, which provides a pair of fixed, long-lived tokens (Primary and Secondary) that are manually generated in the Developer Console. This approach is being replaced by CCG and JWT authentication, which offer programmatic token management, automatic refresh, and access to the full Box API. If you have an existing Limited Access App, follow these steps to migrate your content to a new CCG or JWT authentication app:- Create a new Platform App using CCG or JWT following the steps above.
- Reupload your content to the new app’s Service Account, or use collaborations to share existing content.
- Replace hard-coded App Tokens with programmatic CCG or JWT token acquisition.
- Update any downscoped token calls.
The
POST /oauth2/token token-exchangeflow is identical; only thesubject_tokenvalue changes.
