How to Build a Magic 8-Ball Voice App with Ruby
This tutorial guides the creation of a Magic 8-Ball voice app using Ruby and the Nexmo Voice API. To start, users need to set up a Vonage API account, create a virtual phone number, and install ngrok to expose their local server externally. The app's flow involves prompting the user to ask a question, pressing 1 to receive an answer, and then displaying a randomly selected response from a predefined array. The app uses Rails as its backend framework and handles caller input errors by checking for the digit '1' in the input. Users must also link their Nexmo account, phone number, and Voice application to complete the setup. Once set up, users can run their app using ngrok and interact with it by calling the Nexmo phone number. The completed app provides a simple yet entertaining way to make decisions or seek advice through the classic Magic 8-Ball mechanic.
Company
Vonage
Date published
May 14, 2021
Author(s)
Lauren Lee
Word count
1790
Language
English
Hacker News points
None found.