Skip to main content

I am using this java code to download the file BoxFile file = new BoxFile(api, “1233071276329”); BoxFile.Info info = file.getInfo();



FileOutputStream stream = new FileOutputStream(info.getName());


file.download(stream);


stream.close(); but I am getting this {“error”:“unauthorized_client”,“error_description”:“The "box_subject_type" value is unauthorized for this client_id”} could anyone please help me.

Hi @user57 ! 🙂



I think you’re using a OAuth 2.0 Auth app,


Is it a file you have access to, when you’re using Box.com in your browser ?



box_subject_type refers to either an enterprise, or a user.



If you’re trying to download a file with a standard OAuth 2.0 app, make sure you have access to this specific file if you’re logged in with a specific user.


Hi @CodeBoxSeb


yes I have access to that specific file and also I am using the command Line interface from there I can access the file but using this code I am getting the error.


Reply