Build the future of communications.
Start building for free

How To: Send an SMS Text Message via the Twilio REST API with PHP


I’ve put together a short video showing how easy it is to send a text message via the Twilio REST API with PHP. This example uses our Twilio PHP Library available on GitHub. Enjoy!

Sending SMS with Twilio REST in Five Easy Steps

In this video I demonstrate how to send an SMS in PHP in five easy steps:

  1. Download the Twilio PHP Helper Library from GitHub
  2. Create a new file and add a reference to the helper library
  3. Set up your account credentials and message data
  4. Send the message by posting to the API
  5. Make sure the message went through

Additional Resources

Be sure to check out our SMS Alerts and Notifications HowTo for more examples of how to use the REST API with PHP. We also have a variety of examples in other languages as well.

If you’d like us to put together an example in your language of choice let us know in the comments below!

Sign up and start building
Not ready yet? Talk to an expert.