Prerequisites

  1. Sign up for a free Plivo trial account OR Log in to your Plivo account. 
  2. Check out our Helper Library page and install the right helper based on the programming language you want to use.
  3. Buy a Plivo phone number. A phone number is required to receive and reply to SMS text messages. You can buy a Plivo phone number in over 19 countries through the Buy Numbers tab on your Plivo account UI. Check the SMS API coverage page for all the supported countries.
  4. Use a web hosting service to host your web application. There are many inexpensive cloud hosting providers that you can use for just a few dollars a month. Follow the instructions of your hosting provider to host your web application.

Set up a Web Server

Let’s assume your web server is located at http://example.com. Below is a snippet to set up a route on your webserver. Now when we send an HTTP request to http://example.com/receive_sms this route will be invoked.


Create an Application

  1. Create an Application by visiting the Application Page and click on New Application or by using Plivo’s Application API.
  2. Give your application a name. Lets call it Receive SMS. Enter your server URL (e.g. http://example.com/receive_sms) in the Message URL field and set the method as POST. See our Application API docs to learn how to modify your application through our APIs.
  3. Click on Create to save your application.

Create Application

Assign a Plivo number to your app

  1. Navigate to the Numbers page and select the phone number you want to use for this app.
  2. Select Receive SMS (name of the app) from the Plivo App dropdown list.
  3. Click on Update to save.

Assign Phone Number to Receive SMS App

If you don’t have a number, go to the Buy Number page to purchase a Plivo phone number.

SMS Phone Number Search

Test it out

Send an SMS to your Plivo number using a regular mobile phone. Plivo will send a request to your Message URL.