Learn how JWT authentication works
Prerequisites
To set up a Platform App using JWT, you need to ensure you have access to the Developer Console from your Box enterprise account. Alternatively, you may sign up for a developer account.App creation steps
Create a Server Authentication app
- Log into Box and go to the Developer Console.
- Click New App.
- Select Server as the app type.
- Click Create.
Select JWT as the authentication method
How you set the method to JWT depends on your enterprise’s Switch server app auth type (CCG or JWT) setting:- When switching is enabled, the app is created using Client Credentials Grant (the default). Open the Configuration tab and change the authentication method to JWT.
- When switching is disabled, the Create a New App dialog shows a Select Method step with Client Credentials Grant preselected. Choose JWT there, because the method is fixed once the app is created.
When switching is enabled, you can change between JWT and
at any time from the Configuration tab. See
for details on credential handling and downtime considerations.
Public and private key pair
Once your app is configured to use JWT, a key pair can be generated via the Configuration tab in the Developer Console. Alternatively, you can generate your own and supply Box with the public key. Regardless of the method you select, your Box account needs to have 2FA enabled for security purposes.Generate a keypair (Recommended)
If you would like to use a Box generated keypair, navigate to the Developer Console where you can generate a configuration file. This file includes a public/private keypair and a number of other application details that are necessary for authentication. To generate this file, navigate to the Configuration tab of the Developer Console and scroll down to the Add and Manage Public Keys section.For security reasons, Box does not store your private key. If you lose your
private key, you need to reset the entire keypair.
Manually add keypair
Alternatively, you may generate your own keypair and upload the public key to the Developer Console. To create a keypair using OpenSSL, open a terminal window and run the following commands.For Windows SystemsWindows users can install and use the Cygwin package to run OpenSSL.
