Twilio
warning
The document is a continuation of the previous document, if you have landed directly on this page then, Please read from page Get started.
#
What is Twilio?
- Twilio is a cloud service which allows you to send SMS and Whatsapp messages programmatically using code.
- Twilio is a paid service and you will have to pay per SMS/Whatsapp message.
#
Setup:Requirements for using Shunya Interfaces Modbus client API's are:
- Twilio account with mobile number assigned from the Cloud platform.
- Twilio auth token from the Cloud platform.
- Twilio SID from the Cloud platform.
- Configuration of Twilio in Shunya Interfaces.
#
Configuration:User needs to configure Shunya Interfaces to connect to the Modbus server, by
writing the configuration file in /etc/shunya/config.json
.
#
Example configuration for Twilio/etc/shunya/config.json
should contain entry.
#
Using the Twilio Shunya Interfaces API2 primary uses of Twilio Shunya Interfaces API's are
- Send SMS message
- Send Whatsapp message
#
Sending SMS messageThe steps given will help you send SMS message via Twilio Cloud Service.
#
Step 1: Write Code to send SMS message via Twilio Cloud Service.That is it done.
info
Checkout ready-to-use Twilio SMS example#
Ready to use example provides sample code and sample cmake, which can be used to quickly get-started using the component.
#
Step 2: Compile and Run codeTo compile and Run code
- Clone the Example
- Compile the program
- Make sure that you have written the configuration in "/etc/shunya/config.json"
- Run the code
#
Sending Whatsapp messageThe steps given will help you send Whatsapp message via Twilio Cloud Service.
#
Step 1: Write Code to send Whatsapp message via Twilio Cloud Service.That is it done.
info
Checkout ready-to-use Twilio Whatsapp example#
Ready to use example provides sample code and sample cmake, which can be used to quickly get-started using the component.
#
Step 2: Compile and Run codeTo compile and Run code
- Clone the Example
- Compile the program
- Make sure that you have written the configuration in "/etc/shunya/config.json"
- Run the code