The application must be configured to allow the creation of user Access Tokens.
This setting can be found in the Configuration tab of the
Developer Console.
Additionally, the authenticated user needs to be a user with Admin permissions,
meaning either an Admin, Co-Admin, or Service Account. See our guide on
User Types for more details.
To create a Box SDK client that authenticates as a specific user, follow the
steps described in the JWT with SDK guide,
but create a user client instead of an “Enterprise” client.
Report incorrect code
Copy
Ask AI
var userId = "12345";var sdk = new BoxJWTAuth(config);var token = sdk.UserToken(appUserID);BoxClient client = sdk.UserClient(userToken, userId);
To create a user Access Token that authenticates as a specific user, follow the
steps as described in the
JWT without SDK guide but instead of creating
a claim for the enterprise, create one for a specific user ID.
Report incorrect code
Copy
Ask AI
var userId = "12345";var claims = new List<Claim>{ new Claim("sub", userid), new Claim("box_sub_type", "user"), new Claim("jti", jti),};