An example application that demonstrates how to send SMS text messages using C++ and libCurl. Requires a POSIX compliant system.
Please read our full article for more information.
git clone https://github.com/TwilioDevEd/twilio_cpp_demo.git cd twilio_cpp_demo make
(You must have a Twilio account to run this example.)
Account SID and the Auth Token can be found in your Twilio console. Change the from number to a number in your Twilio Account, and change the to number to someone you'd like to get a message!
account_sid=ACXXXXXXXXXXXXXXXXXXXXXX auth_token=your_auth_token bin/cpp_demo -a $account_sid -s $auth_token -t "+18005551212" -f "+18005551213" -m "Hello, World!" # Optionally, add '-p' to send a MMS, example: '-p https://demo.twilio.com/logo.png'
Hopefully you can use this as a base for a larger project, or incorporate it into your existing projects.
- MIT License
- Lovingly crafted by Twilio Developer Education.