# List voters for an answer

`GET /v1/polls/:pollId/answers/:answerId/voters`

Returns users who selected a specific answer, in pages of 50. Bitrix24 controls visibility; nobody can see voter identities in an anonymous poll.

The poll is read first to check result visibility under Bitrix24 rules. When `resultsVisible: false`, the API returns `403 RESULTS_HIDDEN` without requesting voters. This read subscribes the user to events, so a Cowork key with read-only access to the Bitrix24 account receives `403 COWORK_READONLY` before any call to Bitrix24.

**Scope:** `vote`. Key restrictions: [Polls](/docs/polls).

## Parameters

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `pollId` (path) | number | yes | — | Positive attachment ID: the `id` field from [poll discovery](/docs/polls/list), rather than `voteId` |
| `answerId` (path) | number | yes | — | Positive ID from `questions[].answers[].id` in the [poll](/docs/polls/get) |
| `page` (query) | number | no | 1 | Positive integer. Fixed page size: 50 voters |

## Examples

### curl — personal key

```bash
curl "https://vibecode.bitrix24.com/v1/polls/7/answers/22/voters?page=1" \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth application

```bash
curl "https://vibecode.bitrix24.com/v1/polls/7/answers/22/voters?page=1" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"
```

### JavaScript — personal key

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/polls/7/answers/22/voters?page=1', {
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})
const result = await res.json()
```

### JavaScript — OAuth application

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/polls/7/answers/22/voters?page=1', {
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})
const result = await res.json()
```

## Response fields

| Field | Type | Description |
| --- | --- | --- |
| `success` | boolean | `true` on success |
| `data` | array | Voters for the selected answer |
| `data[].id` | number | User ID |
| `data[].name` | string | Name |
| `data[].position` | string \| null | Position |
| `data[].avatarUrl` | string \| null | Avatar URL |
| `meta.page` | number | Current page |
| `meta.pageSize` | number | 50 |
| `meta.total` | number | Total supplied by Bitrix24 |
| `meta.nextPage` | number \| null | Next page; `null` at the end |

## Response example

Illustrative response based on the normalizer and test fixtures; not a live Bitrix24 response.

```json
{
  "success": true,
  "data": [
    {
      "id": 9,
      "name": "Ada",
      "position": "Engineer",
      "avatarUrl": null
    }
  ],
  "meta": {
    "page": 1,
    "pageSize": 50,
    "total": 51,
    "nextPage": 2
  }
}
```

## Errors

| HTTP | Code | Cause and action |
| --- | --- | --- |
| 400 | `INVALID_PARAMS` | Invalid ID or request parameter |
| 401 | `TOKEN_MISSING` | No Bitrix24 user session |
| 403 | `SCOPE_DENIED` | Required scope is missing |
| 403 | `RESULTS_HIDDEN` | Results hidden under Bitrix24 rules |
| 403 | `POLL_ACCESS_DENIED` | Bitrix24 denied reading the poll during the result visibility check |
| 403 | `COWORK_READONLY` | Operation forbidden for a Cowork portal-readonly key |
| 404 | `POLL_NOT_FOUND` | Poll missing or inaccessible |
| 404 | `ANSWER_NOT_FOUND` | Answer missing or its voter list is inaccessible |
| 422 | `BITRIX_ERROR` | Bitrix24 rejected the request, for example because the method is unavailable in this version |

Other authentication refusals, limits and shared errors: [error codes](/docs/errors).

```json
{
  "success": false,
  "error": {
    "code": "INVALID_PARAMS",
    "message": "Invalid poll parameters."
  }
}
```
