For work with the service I use gem 'boxr'. For uploading files, authentication is required, which I perform through JWT, as described in the documentation
user = Boxr::get_user_token(user_id, private_key: ENV['JWT_PRIVATE_KEY'], private_key_password: ENV['JWT_PRIVATE_KEY_PASSWORD'], public_key_id: ENV['JWT_PUBLIC_KEY_ID'], client_id: ENV['BOX_CLIENT_ID'], client_secret: ENV['BOX_CLIENT_SECRET'])
In user_id, you must pass the id of the user who has access to the application. There is a user admin (owner, default, say his id is 1) and there is a second one, which I created (id = 2).
If I pass user_id = 2 (the second user I created, not the admin), I get no errors and can continue to work.
If I pass user_id = 1 (admin id), I get the error:
{"error":"invalid_request","error_description":"Cannot obtain token based on the enterprise configuration for your app»}

