Description of the Issue
Hello,
I have a Box App registered with notification suppressing feature enabled. I'd like to have this working using Box Java SDK specifically on file downloads.
Unfortunately even with correct permissions I'm getting 403/401 errors.
The sample code snippet, assuming that I have already created valid BoxAPIConnection object:
connection.suppressNotifications();
var file = new BoxFile(connection, "file_id_is_here"); //most probably 403 is returned on fetching this file data
// then download using file.getDownloadUrl()
I'd like to know about correct API/SDK usage, so please confirm if:
- header will work when using
new BoxFile(connection, "fileId") or
- header will work only if we send it during the request to the URL got from BoxFile object
boxFile.getDownloadUrl() or
- header will work only if we send it during the call of GET /files/:id/content
It is worth mentioning, that after enabling required scopes, I did a reauth to the app as an admin user.
Steps to Reproduce
- Have an app with correct permissions set and suppressing notifications enabled.
- Create proper BoxAPIConnection object.
- Try abovementioned code snippet.
Expected Behavior
I'd expect to not get a 403 error on creating BoxFile/downloading file.
I'd expect file to download without e-mail notification.
Error Message, Including Stack Trace
I'm getting BoxAPIException with responseCode 403.
Caused by: com.box.sdk.BoxAPIResponseException: The API returned an error code [403 | .0213727714915930b09b5704a89e3fd76] access_denied_insufficient_permissions - Access denied - insufficient permission.
Screenshots
N/A
Versions Used
Java SDK: 11+
Description of the Issue
Hello,
I have a Box App registered with notification suppressing feature enabled. I'd like to have this working using Box Java SDK specifically on file downloads.
Unfortunately even with correct permissions I'm getting 403/401 errors.
The sample code snippet, assuming that I have already created valid
BoxAPIConnectionobject:I'd like to know about correct API/SDK usage, so please confirm if:
new BoxFile(connection, "fileId")orboxFile.getDownloadUrl()orIt is worth mentioning, that after enabling required scopes, I did a reauth to the app as an admin user.
Steps to Reproduce
Expected Behavior
I'd expect to not get a 403 error on creating BoxFile/downloading file.
I'd expect file to download without e-mail notification.
Error Message, Including Stack Trace
I'm getting BoxAPIException with responseCode 403.
Screenshots
N/A
Versions Used
Java SDK: 11+