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

Learn How to Use Twilio Functions by Building an SMS Measurement Converter for JavaScript Beginners

Blog post from Twilio

Post Details
Company
Date Published
Author
Hayden Powers
Word Count
2,840
Language
English
Hacker News Points
-
Summary

"YOUR OUTPUT JSON LINK"` should be replaced with the actual URL of your uploaded `output.json` file in the Twilio Console, which can be found by clicking the three stacked dots next to the asset and copying the link. The converter uses this link to fetch the conversion rates from a remote JSON file when it receives an SMS message from a user. If the received message is not properly formatted, the converter sends a default response with a chart image, indicating that the sender needs to format their message correctly. Otherwise, it converts the measurement and sends the result back to the sender as an SMS reply.