curl --request GET \
--url https://pollunit.com/api/v1/polls/{poll_id}/voters \
--header 'Authorization: Bearer <token>'import requests
url = "https://pollunit.com/api/v1/polls/{poll_id}/voters"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://pollunit.com/api/v1/polls/{poll_id}/voters', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pollunit.com/api/v1/polls/{poll_id}/voters",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://pollunit.com/api/v1/polls/{poll_id}/voters"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://pollunit.com/api/v1/polls/{poll_id}/voters")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pollunit.com/api/v1/polls/{poll_id}/voters")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"user_name": "<string>",
"changed_by_admin": true,
"complete": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"fraudulent": true,
"paid": true,
"required_option_votes_complete": true,
"privacy_policy_accepted": true,
"terms_accepted": true
}
]{
"error": "Unauthorized"
}{
"error": "Not Found"
}List poll participants
Returns one page of the participants of the poll. Polls that hide their participants only list them with admin access. Use the X-Total-Pages / X-Total-Count response headers to page through the full list.
curl --request GET \
--url https://pollunit.com/api/v1/polls/{poll_id}/voters \
--header 'Authorization: Bearer <token>'import requests
url = "https://pollunit.com/api/v1/polls/{poll_id}/voters"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://pollunit.com/api/v1/polls/{poll_id}/voters', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pollunit.com/api/v1/polls/{poll_id}/voters",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://pollunit.com/api/v1/polls/{poll_id}/voters"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://pollunit.com/api/v1/polls/{poll_id}/voters")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pollunit.com/api/v1/polls/{poll_id}/voters")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"id": "<string>",
"user_name": "<string>",
"changed_by_admin": true,
"complete": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"fraudulent": true,
"paid": true,
"required_option_votes_complete": true,
"privacy_policy_accepted": true,
"terms_accepted": true
}
]{
"error": "Unauthorized"
}{
"error": "Not Found"
}Authorizations
Personal API token — find yours under My Account → API.
Path Parameters
Poll member_hash or admin_hash
Query Parameters
Page to return, 1-based. Defaults to 1.
Participants per page. Defaults to 30. At most 100.
public_id of an organization the user belongs to. When given, the request runs in that organization context instead of the personal account.
Response
participants listed
Voter public_id
Name of the participant. A generated name when the poll has anonymize_voter_names.
The votes of this participant were changed by an admin.
Surveys only: the participant finished the survey.
Admin access only
Admin access only. false while a voting fee for this participant is still open.
Admin access only, and only when the poll has option_vote_requirement all_options.
Admin access only, and only when the poll has privacy_policy_for_voters.
Admin access only, and only when the poll has terms_for_voters.