Documentation Index
Fetch the complete documentation index at: https://developer.box.com/llms.txt
Use this file to discover all available pages before exploring further.
Join us on May 20th for the Content + AI Virtual Summit. Register now
Documentation Index
Fetch the complete documentation index at: https://developer.box.com/llms.txt
Use this file to discover all available pages before exploring further.
def self.user_client(user_id)
access_token=Rails.cache.fetch("box_tokens/user/#{user_id}", :expires_in => 50.minutes) do
puts "getting new user token"
response= Boxr::get_user_token(user_id, private_key: PRIVATE_KEY, private_key_password: ENV['JWT_PRIVATE_KEY_PASSWORD'])
response.access_token
end
Boxr::Client.new(access_token)
end
//Define resource/scopes that downscoped token has access to
String resource = "https://api.box.com/2.0/files/RESOURCE_ID";
List<String> scopes = new ArrayList<String>();
scopes.add("base_preview");
scopes.add("item_download");
//Preform token exchange
ScopedToken downscopedToken =
client.getLowerScopedToken(scopes,resource);
//Downscoped token available in downscopedToken.getAccessToken()
このページは役に立ちましたか?