Search code examples
javajwtbox-api

Using Box with JWT (Server Authentication)


I using Box API JWT Server Authentication:

IAccessTokenCache accessTokenCache = new InMemoryLRUAccessTokenCache(100);

Reader reader = new FileReader("D:\\config.json");
BoxConfig boxConfig = BoxConfig.readFrom(reader);

BoxAPIConnection api = BoxDeveloperEditionAPIConnection.getAppUserConnection(USER_ID,boxConfig);

but the Box exception:

{"error":"unauthorized_client","error_description":"This app is not authorized by the enterprise admin"}

enter image description here


Solution

  • The admin of Box has to go to Admin Console -> Enterprise Settings -> Apps and authorize your app.