To add the voting to your website, you need to follow just two steps:
Our application needs to identify who is voting to determine if this person already voted or not, so we created the identifier mechanism to facilitate this process, without the need for voter login.
The first step is to request an identifier for a voter. Just send a GET request to our public API to get a JSON with the UUID identifier:
GET https://vote-hub.app/api/voter
{ "voter": "f270db9b-ae4b-4e47-b52c-2ca813d0b150" }
After receiving the voter identifier, be sure to store it in your application to identify the voter in the future. For example, if the voter comes from your users' database table, you can add a voter_identifier field and store the identifier on it.
We recommend doing it in two moments: when creating a new voter, and/or when opening the voting page, checking if the voter has already the identifier, and request one if necessary.
Just paste the Iframe code (you can get it acessing the voting and clicking on Share/Embed) in the page you want to integrate it and replace the VOTER_IDENTIFIER_HERE text with the identifier you have stored in the database.