Skip to main content
Get started with Plivo Messaging in minutes. This guide walks you through sending your first SMS/MMS message and receiving incoming messages.

Prerequisites

Before you begin:
  1. Sign up for a Plivo account (free trial includes credits)
  2. Note your Auth ID and Auth Token from the console dashboard
  3. Rent a phone number for sending/receiving messages

Install the SDK

For web framework support, also install Flask:

Send an SMS Message

Send an outbound SMS message from your Plivo number to any destination number.
Replace the phone numbers with your Plivo number and destination number in E.164 format (e.g., +12025551234).

Send an MMS Message

Send a message with media attachments (US and Canada only).

Receive an Incoming Message

Set up a web server to handle incoming messages. When someone sends an SMS to your Plivo number, Plivo sends a request to your Message URL with the message details.
Run: python app.py

Expose Your Server

Use ngrok to expose your local server to the internet:
Copy the HTTPS forwarding URL (e.g., https://abc123.ngrok.io).

Configure Your Number

  1. Go to Messaging Applications in the Plivo console
  2. Click Add New Application
  3. Set the Message URL to your ngrok URL + /receive_sms/ (e.g., https://abc123.ngrok.io/receive_sms/)
  4. Save the application
  5. Go to Phone Numbers and assign the application to your number

Reply to an Incoming Message

Return XML to automatically reply to incoming messages.

Next Steps