Delivery Reports


    Once the Message API request is successful, your SMS will be put into a queue to be sent to its destination. By default, you will not receive an automatic notification regarding the delivery of your SMS. To get notified on the status of your message, include the url parameter in your API request. You can also find your SMS delivery reports in the SMS Logs of your Plivo account. This will automatically output a notification when your SMS reaches its destination, or if it fails to deliver. Your delivery report will update to show either "queued", "sent", "delivered", "undelivered", or "failed" for each individual recipient.

    Note: Long SMS messages are automatically split and concatenated into a seamless user experience. When checking Message Logs and Delivery Reports for long SMS messages that are split, look for the `MessageUUID`, which is the same in all split messages and identical to the UUID of the first message in the split sequence of messages.
    Advanced Hack: Check out our Message API docs to see how you can get the details of a single message or all your messages in a single GET request.


    In this section, we will guide you to build an app to Receive Delivery Reports.


    • Plivo Auth Id and Auth Token: You will find your Plivo Auth Id and Auth Token on the home screen of your Plivo Console. Click here to sign-up for a Plivo account if you haven’t already!

      Find Your Auth Credentials on Plivo Console

    • Plivo Phone Number(Optional): To send messages to the United States and Canada, you must have a Plivo phone number that supports SMS. Numbers can be purchased from the Numbers section of your Plivo Console and use the same as the source number/from number for the outbound SMS. This number will also help you receive incoming SMS as you must have a SMS-enabled Plivo phone number to do the same. Please note that you can also purchase numbers using the Numbers API.

      Buy a New Plivo Number

    Install .NET Core and the Plivo .NET Server SDK

    You must set up and install Dotnet Core(.NET Core 1.0 or higher) and Plivo’s Dotnet SDK to Receive Delivery Reports. Here’s how.

    Install Dotnet Core

    Operating SystemInstructions
    macOS & LinuxTo see if you already have Dotnet Core installed, run the command dotnet --version in the terminal. If you do not have it installed, you can install it from here.
    WindowsTo install Dotnet Core on Windows follow the instructions listed here.

    Install Plivo & Nancy Dotnet Package

    • Create a project directory, run the following command:

      $ mkdir mydotnetcoreapp
    • Change the directory to our project directory in the command line:

      $ cd mydotnetcoreapp
    • Install the SDK using Dotnet CLI. You can follow the below commands to install Plivo SDK using Dotnet CLI

      $ dotnet new console
      $ dotnet add package Plivo --version 4.9.0
      $ dotnet add package Nancy --version 2.0.0

    Delivery Reports

    Below is the code to handle delivery reports.

    using Nancy;
    using System;
    using System.Collections.Generic;
    namespace NancyStandalone
      public class FunctionsModule : NancyModule
        public FunctionsModule()
          Post("/delivery", parameters =>
              // Sender's phone number
              String from_number = Request.Form["From"];
              // Receiver's phone number
              String to_number = Request.Form["To"];
              // The text which was received
              String text = Request.Form["Text"];
              // Print the message
              Console.WriteLine("Message received - From: {0}, To: {1}, Text: {2}", from_number, to_number, text);
              return "Delivery status reported";

    Exposing your local server to the internet

    To receive Incoming Messages and to handle callbacks, your local server should be able to connect with Plivo API service, Ngrok is a tunneling software used to expose a web server running on your local machine to the internet. Using Ngrok you can set webhooks which can talk to Plivo server.

    ngrok block diagram

    You can download and install ngrok from here. Follow the detailed configuration instructions to get started.

    Run ngrok on the port which currently hosts your application. For example, if your port number is 80, run the following command:

    ./ngrok http <port_on_which_your_local_server_is_running>

    This will give you a UI with links that look like* which you can use to access your local server using the public network.

    Sample ngrok CLI

    Create an Application

    1. Create an Application by visiting the Application Page and click on New Application. You can also use Plivo’s Application API.
    2. Give your application a name. Let’s call it Receive SMS. Enter your server URL (e.g. 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 Application 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 Delivery Reports

    Test and validate

    Send an SMS to your Plivo number using a regular mobile phone. Plivo will send a request to your Message URL with the parameters listed in the Messages Documentation.