JWT authentication to access the Box API, 401 returned.
I used JWT authentication to access the Box API, but the
401 will be returned.
com.box.sdk.BoxAPIResponseException: The API returned an error code [401 | .0f59ac9ffb7dbcd614c3b6a071320e0c1]
at com.box.sdk.BoxAPIResponse.(BoxAPIResponse.java:92) ~[box-java-sdk-2.51.0.jar:na]
at com.box.sdk.BoxAPIRequest.trySend(BoxAPIRequest.java:678) ~[box-java-sdk-2.51.0.jar:na]
at com.box.sdk.BoxAPIRequest.send(BoxAPIRequest.java:382) ~[box-java-sdk-2.51.0.jar:na]
at com.box.sdk.BoxAPIRequest.send(BoxAPIRequest.java:349) ~[box-java-sdk-2.51.0.jar:na]
at com.box.sdk.JSONIterator.loadNextPage(JSONIterator.java:75) ~[box-java-sdk-2.51.0.jar:na]
at com.box.sdk.JSONIterator.loadNextJsonObject(JSONIterator.java:97) ~[box-java-sdk-2.51.0.jar:na]
at com.box.sdk.JSONIterator.hasNext(JSONIterator.java:32) ~[box-java-sdk-2.51.0.jar:na]
at com.box.sdk.BoxItemIterator.hasNext(BoxItemIterator.java:28) ~[box-java-sdk-2.51.0.jar:na]
The license you are currently using is Individual plan.
Is this relevant?
I looked for the documentation, but I couldn't find it.
We plan to purchase a paid license in the future.
The implementation is as follows.
var reader = new FileReader("/path/config.json");
var config = BoxConfig.readFrom(reader);
var api = new BoxAPIConnection(config);
var rootFolder = BoxFolder.getRootFolder(api);
var rootInfo = new BoxFolder(api, rootFolder.getID());
for (BoxItem.Info itemInfo : rootInfo) { // This is where it happens.
I raised the same comment on the Github issue
サインインしてコメントを残してください。
コメント
1件のコメント