List who voted on a poll
const url = 'https://chat.work.optidata.cloud/api/chats/36/messages/176/poll/voters';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://chat.work.optidata.cloud/api/chats/36/messages/176/poll/voters \ --header 'Authorization: Bearer <token>'The voters of the poll carried by the message, grouped by the option they picked. Deleted users are left out of both the groups and the counts.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Numeric id of the conversation.
Numeric id of the message.
Responses
Section titled “ Responses ”The poll’s voters and per-option counts.
object
Voters keyed by option id.
object
A user who voted on a poll option.
object
One answer of a poll.
object
Display order, starting at 0.
Vote counts keyed by option id, plus an All key with the
total.
object
Examples
{ "poll_voters": { "11": [ { "id": 5, "uuid": "7c2f4b18-a90d-4d6e-8f11-2b5c9e70a334", "name": "John Smith", "username": null, "email": "john.smith@acme.example", "deleted_at": null } ], "12": [] }, "poll_options": [ { "id": 11, "content": "Monday", "position": 0 }, { "id": 12, "content": "Tuesday", "position": 1 } ], "votes_count": { "11": 1, "12": 0, "All": 1 }}Missing, malformed or expired authentication key.
Authentication failures — and a few permission denials — use an error
key rather than message.
object
Examples
No bearer token sent
{ "error": "JWT passport exception: Missing bearer token in request"}The caller is not a participant of the conversation, or lacks the role the operation requires.
Generic error envelope used by policy, binding and framework failures.
object
Human-readable description of the failure.
Examples
{ "message": "This action is unauthorized."}The resource does not exist, or does not belong to the given conversation.
Generic error envelope used by policy, binding and framework failures.
object
Human-readable description of the failure.
Examples
{ "message": "No query results for model [App\\Models\\Chat\\Chat] 99999999"}Rate limit exceeded. Retry after the window resets.
Generic error envelope used by policy, binding and framework failures.
object
Human-readable description of the failure.
Examples
{ "message": "Too Many Attempts."}