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"}
The admin of Box has to go to Admin Console -> Enterprise Settings -> Apps and authorize your app.