Vote polls

Use this endpoint (https://komico.edubrazeal.com/mobile_api/vote_polls) to vote on a poll


Post parameters

Field Value Remarks
session_id ​Access token ID E.g. e7a4652c3231fc74761...
post_id ​Post ID E.g. 7182
poll_id Poll index ID (starts from 0,1,2,3 etc..) E.g. To vote for first option of a poll send 0

Success response

{
        "code": 200,
        "message": "Poll voted successfully",
        "data":{
            "poll_data":{
                "has_voted": 1,
                "total": 5,
                "options":[
                    {
                        "percentage": "20",
                        "total": 1,
                        "option": "Option A"
                    },
                    {
                        "percentage": "60",
                        "total": 3,
                        "option": "Option B"
                    },
                    {
                        "percentage": "20",
                        "total": 1,
                        "option": "Option C"
                    }
                ]
            }
        }
    }
    

Error responses

{
        "code": 400,
        "message": "An error occurred while processing your request",
        "data": []
    }

    {
        "code": 400,
        "message": "Post id missing or invalid",
        "data": []
    }