Skip to Content
MinexonMinexon

API data

Show vote provider records in the dashboard or verify a player’s vote.

Menu path Admin Dashboard → Content → Data → Vote → API data

Choose a purpose

Select Add API source, enter a Name, and choose the Purpose.

  • Data list maps records from the provider into a dashboard table.
  • Vote verification sends the provider a request to check the signed-in player’s vote. After saving, attach the source to a voting site.

Provider preset offers templates for Minecraft-MP, McAdres vote checks, MCSunucular and the McAdres voter list. Load preset fills in the form. Check the address, parameters and authentication against your server’s registration with the provider. Choose Custom source to enter the settings yourself.

Set up the request and authentication

MCSunucular preset showing its HTTPS address, GET method, request parameters, and an empty API key field

  • Enter the endpoint in HTTPS API address without query parameters. Configure additional provider domains using the server setting MINEXON_VOTE_API_HOSTS.
  • Match HTTP method and Parameter location to the provider’s API. GET uses URL query. POST supports URL query, Form body or JSON body.
  • Under Request parameters, add a row for each unique name and value. %api_key% sends the stored provider key and %username% sends the signed-in player’s username. Vote verification requires %username%. In a JSON body, use a value such as json:true to send a typed JSON value.
  • If the provider requires an Authentication header, use Authorization or a header beginning with X-. Key prefix can be a value such as Bearer. Minexon encrypts the API key. Leave the key blank when editing the same endpoint to keep the stored key. If you change the endpoint, re-enter the key when required.

Map the response

Choose JSON, CSV or plain text under Response format. Vote verification accepts JSON and plain text.

  • Response field applies to JSON. Enter a path to the list, such as data.voters, or to a single verification value, such as data.voted. Leave it blank to use the root response.
  • Display columns apply to data lists. Enter a response field such as nickname and a display label such as Player for each column. For CSV, use fields from the header row. For plain text, use value. Use the arrows to set the order.
  • Success values apply to vote verification. Enter the provider’s accepted values as a comma-separated list, such as 1,2 or true.

Open results and manage sources

Search the source list by name and filter it by purpose. View data is available for Data list sources. Fetch data loads up to 500 rows from the provider’s latest response. Search the fetched rows, sort them from the column headers, and choose 10, 25 or 50 rows per page. Wait 30 seconds before fetching again. After saving changes to a source, fetch again to repopulate the table.

To switch a verification source to Data list, first detach it from its voting sites. To remove sources, use the delete action on a row or choose Delete selected for multiple rows. Confirm the deletion. Linked sites keep their voting links and lose vote verification.

Permissions vote.sources.manage with vote.data.view. Creating, editing and deleting require vote.data.create, vote.data.edit and vote.data.archive, respectively. Viewing results requires vote.source.results. Fetching also requires vote.source.refresh.