List user's email aliases

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

Retrieves all email aliases for a user. The collection does not include the primary login for the user.

Request

application/json

Path Parameters

stringin pathrequired
12345

The ID of the user.

Response

application/jsonEmail Aliases

Returns a collection of email aliases.

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/email_aliases \
     -H "Authorization: Bearer <ACCESS_TOKEN>"
.NET
BoxCollection<BoxEmailAlias> aliases = await client.UsersManager
    .GetEmailAliasesAsync(userId: "33333");
Java
BoxUser user = new BoxUser(api, "0");
Collection<EmailAlias> emailAliases = user.getEmailAliases();
Python
user_id = '33333'
user = client.user(user_id)
email_aliases = user.get_email_aliases()
for alias in email_aliases:
    print('User {0} has email alias {1}'.format(user.id, alias.email))
Node
client.users.getEmailAliases('33333')
    .then(emailAliases => {
        /* emailAliases -> {
            total_count: 2,
            entries: 
            [ { type: 'email_alias',
                id: '1234',
                is_confirmed: true,
                email: 'user+foo@example.com' },
                { type: 'email_alias',
                id: '1235',
                is_confirmed: true,
                email: 'user+bar@example.com' } ] }
        */
    });

Response Example

{
  "total_count": 5000,
  "entries": [
    {
      "id": 11446498,
      "type": "email_alias",
      "email": "alias@example.com",
      "is_confirmed": true
    }
  ]
}