2017-05-06 53 views
5

我用盒API JWT Server身份驗證:用盒子與智威湯遜(Server身份驗證)

 IAccessTokenCache accessTokenCache = new InMemoryLRUAccessTokenCache(100); 

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


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

但框例外:

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

enter image description here

回答

4

框的管理員已去到管理控制檯 - >企業設置 - >應用程序並授權您的應用程序。

+0

謝謝您的回覆,可以給你看看的步驟,如何將應用程式,並授權可應用程式 – virmeidec

+0

在JWT應用程式列表中,如果你點擊省略號,選擇「授權」 – kendomen

4

@kendomen是正確的。這裏有一些細節:

轉到api.box.com。然後選擇管理控制檯。

enter image description here

現在,這是它變得時髦。點擊安全步驟。

enter image description here

然後小字。

enter image description here

這使本來應該顯示三個步驟前的工具欄。點擊應用。

enter image description here

然後點擊授權新的應用程序。

enter image description here

這飛架在其中輸入應用程序鍵彈出。這被稱爲您可能從Box.com下載的json文件中的「ClientID」。

enter image description here

+0

有現在是UI的輕微變化, 它位於Business Settings(https://monosnap.com/file/1GtysqvkwMh0gWsbpiRYnvswdGPw68.png) – katzmopolitan

相關問題