I am attempting to use Token Exchange with the Box Java SDK to be used with the Content Picker UI element. I would like to limit my users to have access to a single folder based on custom user variables from my website. However, whenever I try downscoping the access token to a folder resource I get:
com.box.sdk.BoxAPIException: Unable to determine resource type: https://api.box.com/2.0/folders/... at com.box.sdk.BoxAPIConnection.getLowerScopedToken(BoxAPIConnection.java:785)
I investigated the getLowerScopedToken function and it seems like it only accounts for file resources, not folders. In determineResourceLinkType(), the only endpoint patterns addressed are for files and links with no /folders/ endpoint.
I see here that it's possible to downscope to a folder with cURL.
Is it possible to downscope to a specific folder with the Java SDK? Do I need to do the POST request from scratch? Is that allowed?
Thanks