会社内のユーザーに関する情報を取得します。
アプリケーションと認証済みユーザーは、会社全体のユーザーを参照する権限が必要です。
また、このエンドポイントは、適切なスコープを持つ認証済みユーザー用として会社が所有するコンテンツでコラボレーションを行う外部ユーザーに対しては、一部の情報のみを返します。その場合、権限が与えられていないフィールドについては、nullが返されます。
curl -X GET https://api.box.com/2.0/users/12345 \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
BoxUser user = await client.UsersManager.GetUserInformationAsync(userId: "33333");
String userID = "33333";
BoxUser user = new BoxUser(api, userID);
BoxUser.Info userInfo = user.getInfo();
user_id = '33333'
user = client.user(user_id).get()
client.users.get('33333')
.then(user => {
/* user -> {
type: 'user',
id: '33333',
name: 'Example User',
login: 'user@example.com',
created_at: '2012-03-26T15:43:07-07:00',
modified_at: '2012-12-12T11:34:29-08:00',
language: 'en',
space_amount: 5368709120,
space_used: 2377016,
max_upload_size: 262144000,
status: 'active',
job_title: 'Employee',
phone: '5555555555',
address: '555 Office Drive',
avatar_url: 'https://app.box.com/api/avatar/deprecated' }
*/
});
client.users.get(userId: "33333", fields: ["name", "login"]) { (result: Result<User, BoxSDKError>) in
guard case let .success(user) = result else {
print("Error getting user information")
return
}
print("Got user \(user.name), with login \(user.login)")
}