- Using API
Here’s how to use Plivo APIs to receive MMS multimedia messages.
Ngrok will provide a public URL (e.g.,
How it works
When someone sends an MMS to your Plivo number, Plivo forwards the message details, including the media URL, to a web server you control. Your server can then process this information.
Prerequisites
To get started, you need a Plivo account — sign up if you don’t have one. You must also have a Plivo phone number that supports MMS. You can rent one from the Numbers page in the console or by using the Numbers API.1. Create a server to receive MMS messages
First, create a web server that can receive POST requests from Plivo. The code below shows how to start a basic server that logs theFrom and To numbers, the Text body, and the Media0 URL from an incoming MMS.Select your programming language to see the specific code.- Node.js
- Ruby
- Python
- PHP
- .NET
- Java
- Go
If this is your first time using Plivo APIs with Node.js, follow our instructions to set up your development environment.Create a file called
receive_mms.js and paste this code into it.2. Expose your local server to the internet
Once your server is running, make it accessible from the public internet so Plivo can send requests to it. We recommend using a tunneling service like ngrok for development.https://<unique-id>.ngrok-free.app) that forwards traffic to your local server.3. Create a Plivo application
A Plivo application tells Plivo how to handle events like incoming messages.- Navigate to Messaging > Applications in the Plivo console and click Add New Application.
-
Give the application a name, like
Receive MMS App. -
Enter your server’s public URL into the
Message URLfield (e.g.,https://<unique-id>.ngrok-free.app/receive_mms/) and set the method toPOST. -
Click Create Application.

4. Assign a Plivo number to your application
To start receiving messages, you must assign a Plivo phone number to the application.- Go to the Numbers page and select the number you want to use.
-
In the Application Type drop-down, select
XML Application. -
From the Plivo Application drop-down, select
Receive MMS App. -
Click Update Number.
