Content Deep Dive
Build an SMS-Based Bot in PHP with Laravel to Track COVID-19 Data
Blog post from Twilio
Post Details
Company
Date Published
Author
Brian Iyoha
Word Count
1,434
Language
English
Hacker News Points
-
Source URL
Summary
This SMS-based bot uses Laravel to create an API endpoint and Twilio's Programmable SMS client to send messages. The bot is set up to receive incoming SMS messages from a Twilio phone number, parse the country name from the message body, and then use the `corona.lmao.ninja` API to retrieve COVID-19 case information for that country. The response is then sent back to the original sender as an SMS message. To deploy the bot publicly, it must be made accessible via the internet using a tool like ngrok. Once deployed, the Twilio phone number webhook settings are updated with a publicly accessible route to the application.