- Sign up for a free Plivo trial account OR login to your Plivo account.
- Check out our Helper Library page for information on how to install the right helper based on the programming language you want to use.
- 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 menu. Check the SMS API coverage page for all the supported countries.
- 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
For this example, let’s assume your web server is located at http://example.com. The following snippet will set up a route on your web server. Now, when we send an HTTP request to http://example.com/receive_sms, this route will be triggered.
Create an application
- Create an application by either visiting the Application Page and clicking on “Add New Application” or by using Plivo’s Application API.
- Give your application a name. For this example, let’s call it “Receive SMS”. Enter your server URL (e.g. http://example.com/receive_sms) in the message URL field and set the method to POST. See our Application API guide to learn how to modify your application through our APIs.
- Click on “Create Application” to save your application.
Assign a Plivo number to your app
- Navigate to the Numbers page and select the phone number you want to use for this app.
- Select “Receive SMS” (the name of the app) from the Plivo App dropdown list.
- Click on “Update Number” to save
If you don’t have a number, go to the Buy Number page to purchase a Plivo phone number.
Test it out
Send an SMS to your Plivo number using a regular mobile phone. Plivo will send a request to your Message URL.