Home / Companies / Twilio / Blog / Post Details
Content Deep Dive

Twilio's Unofficial Vote for the Eurovision Song Contest

Blog post from Twilio

Post Details
Company
Date Published
Author
Naomi Pentrel
Word Count
1,602
Language
English
Hacker News Points
-
Summary

Twilio has created an unofficial Eurovision Song Contest voting system that allows users to vote for their favorite songs and view the current top 10 results. The system uses a Twilio phone number as the event number, and users can vote by texting "2022" or another year followed by the country they want to vote for. Alternatively, users can text "Results" followed by the year to see the current top 10 results. The system stores votes in a MongoDB database and uses a hash of the user's phone number to ensure that only one vote per user is counted. The Twilio function is serverless and runs on a Node.js script, which connects to the MongoDB database and processes incoming messages. Once set up, users can use the phone number to participate in the voting system and share their results with others.