Audience
Vote on the open poll
Cookie ws_part required. optionId for choice/quiz/rating; text for
word cloud / open text; ranks for ranking. Allowed while session live
and a poll is open.
POST
/
api
/
sessions
/
{id}
/
vote
Vote on the open poll
curl --request POST \
--url https://www.askplane.com/api/sessions/{id}/vote \
--header 'Content-Type: application/json' \
--cookie ws_part= \
--data '
{
"optionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"text": "<string>",
"ranks": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'import requests
url = "https://www.askplane.com/api/sessions/{id}/vote"
payload = {
"optionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"text": "<string>",
"ranks": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
headers = {
"cookie": "ws_part=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'ws_part=', 'Content-Type': 'application/json'},
body: JSON.stringify({
optionId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
text: '<string>',
ranks: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
})
};
fetch('https://www.askplane.com/api/sessions/{id}/vote', 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://www.askplane.com/api/sessions/{id}/vote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'optionId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'text' => '<string>',
'ranks' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]),
CURLOPT_COOKIE => "ws_part=",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://www.askplane.com/api/sessions/{id}/vote"
payload := strings.NewReader("{\n \"optionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"text\": \"<string>\",\n \"ranks\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "ws_part=")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://www.askplane.com/api/sessions/{id}/vote")
.header("cookie", "ws_part=")
.header("Content-Type", "application/json")
.body("{\n \"optionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"text\": \"<string>\",\n \"ranks\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.askplane.com/api/sessions/{id}/vote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = 'ws_part='
request["Content-Type"] = 'application/json'
request.body = "{\n \"optionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"text\": \"<string>\",\n \"ranks\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"voted": true
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}⌘I
Vote on the open poll
curl --request POST \
--url https://www.askplane.com/api/sessions/{id}/vote \
--header 'Content-Type: application/json' \
--cookie ws_part= \
--data '
{
"optionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"text": "<string>",
"ranks": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'import requests
url = "https://www.askplane.com/api/sessions/{id}/vote"
payload = {
"optionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"text": "<string>",
"ranks": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
headers = {
"cookie": "ws_part=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'ws_part=', 'Content-Type': 'application/json'},
body: JSON.stringify({
optionId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
text: '<string>',
ranks: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
})
};
fetch('https://www.askplane.com/api/sessions/{id}/vote', 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://www.askplane.com/api/sessions/{id}/vote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'optionId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'text' => '<string>',
'ranks' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]),
CURLOPT_COOKIE => "ws_part=",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://www.askplane.com/api/sessions/{id}/vote"
payload := strings.NewReader("{\n \"optionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"text\": \"<string>\",\n \"ranks\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "ws_part=")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://www.askplane.com/api/sessions/{id}/vote")
.header("cookie", "ws_part=")
.header("Content-Type", "application/json")
.body("{\n \"optionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"text\": \"<string>\",\n \"ranks\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.askplane.com/api/sessions/{id}/vote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = 'ws_part='
request["Content-Type"] = 'application/json'
request.body = "{\n \"optionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"text\": \"<string>\",\n \"ranks\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"voted": true
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}