curl --location --request POST 'https://api.userorbit.com/v1/public/topic-votes.info' \
--header 'Authorization: Bearer SUBSCRIBER_JWT_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"id": "topic-uuid-123"
}'
const response = await fetch('https://api.userorbit.com/v1/public/topic-votes.info', {
method: 'POST',
headers: {
'Authorization': `Bearer ${subscriberToken}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({ id: topicId })
});
const { data } = await response.json();
console.log(`Votes: ${data.count}, Voted: ${data.isSubscriberVoted}`);
{
"data": {
"count": 156,
"isSubscriberVoted": true
}
}
Votes
Get Topic Vote Info
Get vote count and subscriber’s vote status for a topic.
POST
/
v1
/
public
/
topic-votes.info
curl --location --request POST 'https://api.userorbit.com/v1/public/topic-votes.info' \
--header 'Authorization: Bearer SUBSCRIBER_JWT_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"id": "topic-uuid-123"
}'
const response = await fetch('https://api.userorbit.com/v1/public/topic-votes.info', {
method: 'POST',
headers: {
'Authorization': `Bearer ${subscriberToken}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({ id: topicId })
});
const { data } = await response.json();
console.log(`Votes: ${data.count}, Voted: ${data.isSubscriberVoted}`);
{
"data": {
"count": 156,
"isSubscriberVoted": true
}
}
Authentication
# Optional subscriber authentication to check vote status
Authorization: Bearer YOUR_API_KEY
# Or:
Authorization: Bearer SUBSCRIBER_JWT_TOKEN
Request Body
string
required
Topic ID (UUID)
Response
object
curl --location --request POST 'https://api.userorbit.com/v1/public/topic-votes.info' \
--header 'Authorization: Bearer SUBSCRIBER_JWT_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"id": "topic-uuid-123"
}'
const response = await fetch('https://api.userorbit.com/v1/public/topic-votes.info', {
method: 'POST',
headers: {
'Authorization': `Bearer ${subscriberToken}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({ id: topicId })
});
const { data } = await response.json();
console.log(`Votes: ${data.count}, Voted: ${data.isSubscriberVoted}`);
{
"data": {
"count": 156,
"isSubscriberVoted": true
}
}
Notes
- Returns
isSubscriberVoted: falseif not authenticated - Real-time vote count
Was this page helpful?
⌘I

