Overview
To complete a JWT authorization the following steps need to be completed.- Read the configuration file
- Initialize an SDK client
The default method of authentication through JWT is inherently tied to the Service
Account for the application. Any API call made with this token will seem to
come from this application and will not have access to files and folders from
other users without explicitly getting access to them.
Prerequisites
Before we can get started, you will need to have completed the following steps.- Create a Box Application within the developer console
- Create and download the private key configuration file for your application and save it as
config.json - Ensure your Box Application is approved for usage within your enterprise
1. Read JSON configuration
After creating a Box Application there should be aconfig.json file containing
the application’s private key and other details. The following is an example.
config.json
config.json fields as follows.
To use this object in the application it needs to be read from file.
Parsing JSONIn some programming languages there is more than one way to read and parse
JSON from a file. Refer to guides on your preferred programming language for
more complete guides, including error handling.
