7

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

Bless
  • 5,052
  • 2
  • 40
  • 44
virmeidec
  • 73
  • 1
  • 3
  • You can Authorize New App here: [https://app.box.com/master/custom-apps](https://app.box.com/master/custom-apps) [![enter image description here](https://i.stack.imgur.com/vWlj4.png)](https://i.stack.imgur.com/vWlj4.png) – Thức Trần Apr 08 '20 at 14:30

2 Answers2

8

@kendomen is correct. Here's some more detail:

Go to api.box.com. Then select Admin Console.

enter image description here

Now this is where it gets funky. Click on the Security step.

enter image description here

Then the fine print.

enter image description here

This gives the tool bar that should have been displayed three steps ago. Click Apps.

enter image description here

Then click on Authorize New App.

enter image description here

This puts up a pop-up where you enter the app key. This is referred to as the "ClientID" in the json file you may have downloaded from Box.com.

enter image description here

Karl Hoaglund
  • 603
  • 10
  • 10
  • There is a slight change in the UI now, it's located under Business Settings (https://monosnap.com/file/1GtysqvkwMh0gWsbpiRYnvswdGPw68.png) – katzmopolitan Feb 09 '18 at 21:44
7

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

kendomen
  • 770
  • 6
  • 13