Request an Access Token using either a client-side obtained OAuth 2.0 authorization code or a server-side JWT assertion.
An Access Token is a string that enables Box to verify that a request belongs to an authorized session. In the normal order of operations you will begin by requesting authentication from the authorize endpoint and Box will send you an authorization code.
You will then send this code to this endpoint to exchange it for an Access Token. The returned Access Token can then be used to to make Box API calls.
A request for a new OAuth 2.0 token.
The type of request being made, either using a client-side obtained authorization code, a refresh token, a JWT assertion, client credentials grant or another access token for the purpose of downscoping a token.
authorization_code, refresh_token, client_credentials, urn:ietf:params:oauth:grant-type:jwt-bearer, urn:ietf:params:oauth:grant-type:token-exchange "authorization_code"
The Client ID of the application requesting an access token.
Used in combination with authorization_code, client_credentials, or
urn:ietf:params:oauth:grant-type:jwt-bearer as the grant_type.
"ly1nj6n11vionaie65emwzk575hnnmrk"
The client secret of the application requesting an access token.
Used in combination with authorization_code, client_credentials, or
urn:ietf:params:oauth:grant-type:jwt-bearer as the grant_type.
"hOzsTeFlT6ko0dme22uGbQal04SBPYc1"
The client-side authorization code passed to your application by Box in the browser redirect after the user has successfully granted your application permission to make API calls on their behalf.
Used in combination with authorization_code as the grant_type.
"n22JPxrh18m4Y0wIZPIqYZK7VRrsMTWW"
A refresh token used to get a new access token with.
Used in combination with refresh_token as the grant_type.
"c3FIOG9vSGV4VHo4QzAyg5T1JvNnJoZ3ExaVNyQWw6WjRsanRKZG5lQk9qUE1BVQ"
A JWT assertion for which to request a new access token.
Used in combination with urn:ietf:params:oauth:grant-type:jwt-bearer
as the grant_type.
"xxxxx.yyyyy.zzzzz"
The token to exchange for a downscoped token. This can be a regular access token, a JWT assertion, or an app token.
Used in combination with urn:ietf:params:oauth:grant-type:token-exchange
as the grant_type.
"c3FIOG9vSGV4VHo4QzAyg5T1JvNnJoZ3ExaVNyQWw6WjRsanRKZG5lQk9qUE1BVQ"
The type of subject_token passed in.
Used in combination with urn:ietf:params:oauth:grant-type:token-exchange
as the grant_type.
urn:ietf:params:oauth:token-type:access_token "urn:ietf:params:oauth:token-type:access_token"
The token used to create an annotator token. This is a JWT assertion.
Used in combination with urn:ietf:params:oauth:grant-type:token-exchange
as the grant_type.
"c3FIOG9vSGV4VHo4QzAyg5T1JvNnJoZ3ExaVNyQWw6WjRsanRKZG5lQk9qUE1BVQ"
The type of actor_token passed in.
Used in combination with urn:ietf:params:oauth:grant-type:token-exchange
as the grant_type.
urn:ietf:params:oauth:token-type:id_token "urn:ietf:params:oauth:token-type:id_token"
The space-delimited list of scopes that you want apply to the new access token.
The subject_token will need to have all of these scopes or
the call will error with 401 Unauthorized..
"item_upload item_preview base_explorer"
Full URL for the file that the token should be generated for.
"https://api.box.com/2.0/files/123456"
Used in combination with client_credentials as the grant_type.
enterprise, user "enterprise"
Used in combination with client_credentials as the grant_type.
Value is determined by box_subject_type. If user use user ID and if
enterprise use enterprise ID.
"123456789"
Full URL of the shared link on the file or folder that the token should be generated for.
"https://cloud.box.com/s/123456"
Returns a new Access Token that can be used to make authenticated
API calls by passing along the token in a authorization header as
follows Authorization: Bearer <Token>.
A token that can be used to make authenticated API calls.
The requested access token.
"c3FIOG9vSGV4VHo4QzAyg5T1JvNnJoZ3ExaVNyQWw6WjRsanRKZG5lQk9qUE1BVQ"
The time in seconds by which this token will expire.
3600
The type of access token returned.
bearer "bearer"
The permissions that this access token permits, providing a list of resources (files, folders, etc) and the scopes permitted for each of those resources.
The refresh token for this access token, which can be used to request a new access token when the current one expires.
"c3FIOG9vSGV4VHo4QzAyg5T1JvNnJoZ3ExaVNyQWw6WjRsanRKZG5lQk9qUE1BVQ"
The type of downscoped access token returned. This is only returned if an access token has been downscoped.
urn:ietf:params:oauth:token-type:access_token "urn:ietf:params:oauth:token-type:access_token"