Vote polls
Please use this (https://blengi.com/mobile_api/vote_polls) API endpoint for polls voting
Post parameters
Field | Value | Remarks |
---|---|---|
session_id | Access token ID | E.g. de25cc16eb00960f076... |
post_id | Post int ID | E.g. 84 |
poll_id | Poll index ID (starts from 0,1,2,3 etc..) | E.g. To vote frist option of a poll send 0 |
Success response
{
"code": 200,
"message": "Poll voted successfully",
"data":{
"poll_data":{
"has_voted": 1,
"total": 1,
"options":[
{
"percentage": "0",
"total": 0,
"option": "option 1"
},
{
"percentage": "100",
"total": 1,
"option": "option 2"
},
{
"percentage": "0",
"total": 0,
"option": "option 2"
}
]
}
}
}
Error responses
{
"code": 400,
"message": "An error occurred while processing your request",
"data": []
}
{
"code": 400,
"message": "Post id is missing or invalid",
"data": []
}