# List folder members

`GET /folder.members`

## Description

List everyone who belongs to a folder and their role (`admin` or
`viewer`). The full member list is returned in one response.

Every `userId` is a principal ID. Resolve names with
[`user.info`](/docs/api/user-info) or
[`user.list`](/docs/api/user-list), which require `user:read`.

**Access:** Organization and Personal. Same visibility as
[`folder.info`](/docs/api/folder-info): a folder the caller cannot see
returns `404` `folder_not_found`.

**Required scope:** `folders:read`

---

**OpenAPI Spec:** [chat-v1.json](https://developer.ro.am/chat-v1.json)

## Authentication

```
Authorization: Bearer YOUR_API_KEY
```

## Parameters

| Name | In | Type | Required | Description |
|------|-----|------|----------|-------------|
| `id` | query | string | Yes | Folder ID. |

## Responses

### 200 - Members retrieved successfully

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `ok` | "true" | Yes | Always `true` on success. See [Responses and Errors](/docs/guides/responses-and-errors). |
| `members` | FolderMember[] | Yes |  |

**FolderMember** (array item):

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `userId` | string | Yes | Principal ID of the member. Resolve a name with [`user.info`](/docs/api/user-info) or [`user.list`](/docs/api/user-list) (`user:read`).  |
| `role` | "admin" | "viewer" | Yes | `admin` is the folder owner. `viewer` can read the folder. |


#### Example Response

```json
{
  "ok": true,
  "members": [
    {
      "userId": "709b8a57-70bc-427a-b6f0-b16ba5297f8c",
      "role": "admin"
    },
    {
      "userId": "af6663d5-0f37-4105-95df-4fea20ef7c7c",
      "role": "viewer"
    }
  ]
}
```

### 400 - Bad request. Missing or invalid `id`.

### 401 - Presented invalid authentication credentials.

### 403 - Token is missing `folders:read`.

### 404 - Folder not found, or not visible to the caller (`folder_not_found`).

### 405 - An unsupported method was requested.

### 500 - An internal error occurred.

---

*Machine-readable API documentation.*
*Full documentation: https://developer.ro.am/docs/api/folder-members*
