MediaWiki API help
This is an auto-generated MediaWiki API documentation page.
Documentation and examples: https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page
action=pollsubmitvote
(main | pollsubmitvote)
- This module requires read rights.
- This module requires write rights.
- This module only accepts POST requests.
- Source: AJAX Poll
- Licence: GFDL-1.2
AJAXPoll API module
Parameters:
- poll
Poll ID, such as 832A5FA2C2583A5732B90CEFF658FE25; IDs are formed by hashing the input (question + answer options, i.e. the text between
<poll>...</poll>
tags) with MD5 hashing algorithm and converting the result to UPPERCASE with PHP'sstrtoupper
function- This parameter is required.
- answer
Numerical answer option identifier; use 0 to revoke a previously cast vote
- This parameter is required.
- Type: integer
- token
A "csrf" token retrieved from action=query&meta=tokens
- This parameter is required.
Example:
- Submit the third (3) answer to the poll that has the ID 832A5FA2C2583A5732B90CEFF658FE25
- api.php?action=pollsubmitvote&poll=832A5FA2C2583A5732B90CEFF658FE25&answer=3 [open in sandbox]