Get user

get
https://api.box.com/2.0
/users/:user_id

Retrieves information about a user in the enterprise.

The application and the authenticated user need to have the permission to look up users in the entire enterprise.

This endpoint also returns a limited set of information for external users who are collaborated on content owned by the enterprise for authenticated users with the right scopes. In this case, disallowed fields will return null instead.

Request

application/json

Path Parameters

stringin pathrequired
12345

The ID of the user.

Query Parameters

string arrayin queryoptional
id,type,name

A comma-separated list of attributes to include in the response. This can be used to request fields that are not normally returned in a standard response.

Be aware that specifying this parameter will have the effect that none of the standard fields are returned in the response unless explicitly specified, instead only fields for the mini representation are returned, additional to the fields requested.

Response

application/jsonUser

Returns a single user object.

Not all available fields are returned by default. Use the fields query parameter to explicitly request any specific fields using the fields parameter.

application/jsonClient error

An unexpected client error.

get
Get user
You can now try out some of our APIs live, right here in the documentation.
Log in

Request Example

cURL
curl -X GET https://api.box.com/2.0/users/12345 \
     -H 'Authorization: Bearer <ACCESS_TOKEN>'
.NET
BoxUser user = await client.UsersManager.GetUserInformationAsync(userId: "33333");
Java
String userID = "33333";
BoxUser user = new BoxUser(api, userID);
BoxUser.Info userInfo = user.getInfo();
Python
user_id = '33333'
user = client.user(user_id).get()
Node
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' }
        */
    });
iOS
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)")
}