---
title: "Get the names of users"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.nicer.travel/llms.txt
> Use this file to discover all available pages before exploring further.

# Get the names of users

Path: Nicer API › identity

`POST /identity/users/resolve`

URL: `https://api.nicer.travel/identity/users/resolve`

Returns the names and avatars of up to 200 users by id, with the agency's AI assistant user first when its id is among them. Only the caller and the people who share an active agency with them are resolved (anyone for Nicer staff); the other ids are left out, as unknown ones are.

## Authentication

- `bearerAuth`, http bearer, header `Authorization`, format `JWT`

## Request body

_Required._

- `userIds` (`identity.users.resolve.userIds`; array of string, required)
  - minLength: `1`

## Example request

```json
{
  "userIds": [
    "string"
  ]
}
```

## Code samples

### JavaScript SDK

```javascript
import { createClient } from "@nicertravel/sdk";

const nicer = createClient({
  baseUrl: "https://api.nicer.travel",
  token: process.env.NICER_TOKEN,
});

await nicer.identity.users.resolve({
  "userIds": [
    "string"
  ]
});
```

### Nicer CLI

```bash
nicer identity users resolve --input - <<'JSON'
{
  "userIds": [
    "string"
  ]
}
JSON
```

### cURL

```bash
curl --request POST \
  --url https://api.nicer.travel/identity/users/resolve \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "userIds": [
    "string"
  ]
}
'
```

### TypeScript

```typescript
const url = 'https://api.nicer.travel/identity/users/resolve';
const options = {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    Authorization: 'Bearer <token>'
  },
  body: JSON.stringify({userIds: ['string']})
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.nicer.travel/identity/users/resolve"

payload = { "userIds": ["string"] }
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

OK

#### Example

```json
{
  "users": [
    {
      "avatar": "string",
      "familyName": "string",
      "fullName": "string",
      "givenName": "string",
      "userId": "string"
    }
  ]
}
```

- `users` (`identity.users.resolve.response.200.users`; array of object, required)
  - `familyName` (`identity.users.resolve.response.200.users.familyName`; string, required)
  - `fullName` (`identity.users.resolve.response.200.users.fullName`; any of, required)
    - any of the following: `string`, `null`
  - `givenName` (`identity.users.resolve.response.200.users.givenName`; string, required)
  - `userId` (`identity.users.resolve.response.200.users.userId`; string, required)
  - `avatar` (`identity.users.resolve.response.200.users.avatar`; string, optional)

### 400

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`identity.users.resolve.response.400.errorCode`; string, required)
- `errorMessage` (`identity.users.resolve.response.400.errorMessage`; string, required)

### 401

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`identity.users.resolve.response.401.errorCode`; string, required)
- `errorMessage` (`identity.users.resolve.response.401.errorMessage`; string, required)

### 403

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`identity.users.resolve.response.403.errorCode`; string, required)
- `errorMessage` (`identity.users.resolve.response.403.errorMessage`; string, required)


Source: https://docs.nicer.travel/api/identity/identity.users.resolve/index.md
