> ## Documentation Index
> Fetch the complete documentation index at: https://plivo.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Send MMS Messages

> Send outbound MMS messages with images, audio, or video via Plivo

<Tabs>
  <Tab title="Node">
    ## Overview

    This guide shows how to send an MMS message to any phone number. Businesses can make messages more meaningful by using MMS instead of SMS and including images, audio, and video to provide context.

    You can start sending MMS messages either by using our PHLO visual workflow builder or our APIs. Follow the instructions in one of the tabs below.

    <Tabs>
      <Tab title="Using API">
        Here’s how to use Plivo APIs to send outbound MMS text messages.

        ### How it works

        <Frame>
          <img src="https://mintcdn.com/plivo/sqGJ0ONkT5kTuesy/images/send-mms-api.jpg?fit=max&auto=format&n=sqGJ0ONkT5kTuesy&q=85&s=131a37c06b410305b28cbd385646e164" alt="Send MMS" width="1446" height="774" data-path="images/send-mms-api.jpg" />
        </Frame>

        ### Prerequisites

        To get started, you need a Plivo account — [sign up](https://cx.plivo.com/signup) with your work email address if you don’t have one already. If this is your first time using Plivo APIs, follow our instructions to set up a Node.js development environment.

        ### Create the send MMS application

        Create a file called `send_mms.js` and paste into it this code.

        ```js theme={null}
        var plivo = require('plivo');
        (function main() {
          'use strict';
          var client = new plivo.Client("<auth_id>", "<auth_token>");
          client.messages.create(
            {
              src: "<sender_id>",
              dst: "<destination_number>",
              text: "Hello, from Node.js!",
              type: "mms",
              media_urls: ["[https://media.giphy.com/media/26gscSULUcfKU7dHq/source.gif](https://media.giphy.com/media/26gscSULUcfKU7dHq/source.gif)"],
              media_ids: ["801c2056-33ab-499c-80ef-58b574a462a2"]
            }
          ).then(function (response) {
            console.log(response);
          });
        })();
        ```

        Replace the auth placeholders with your authentication credentials from the [Plivo console](https://cx.plivo.com/home). Replace the phone number placeholders with actual phone numbers in [E.164 format](https://en.wikipedia.org/wiki/E.164) (for example, +12025551234). In countries other than the US and Canada you can use a [sender ID](/docs/messaging/concepts/sender-id-usage/) for the message source. You must have a Plivo phone number to send messages to the US or Canada; you can buy a Plivo number from Phone Numbers > [Buy Numbers](https://cx.plivo.com/phone-numbers) on the Plivo console or via the [Numbers API](/docs/numbers/phone-numbers#buy-a-phone-number).

        <Note>
          Note:
          We recommend that you store your credentials in the `auth_id` and `auth_token` environment variables to avoid the possibility of accidentally committing them to source control. If you do this, you can initialize the client with no arguments and Plivo will automatically fetch the values from the environment variables. You can use `process.env` to store environment variables and fetch them when initializing the client.
        </Note>

        ### Test

        Save the file and run it.

        ```shell theme={null}
        node send_mms.js
        ```
      </Tab>
    </Tabs>
  </Tab>

  <Tab title="Ruby">
    ## Overview

    This guide shows how to send an MMS message to any phone number. Businesses can make messages more meaningful by using MMS instead of SMS and including images, audio, and video to provide context.

    You can start sending MMS messages either by using our PHLO visual workflow builder or our APIs. Follow the instructions in one of the tabs below.

    <Tabs>
      <Tab title="Using API">
        Here’s how to use Plivo APIs to send outbound MMS text messages.

        ### How it works

        <Frame>
          <img src="https://mintcdn.com/plivo/sqGJ0ONkT5kTuesy/images/send-mms-api.jpg?fit=max&auto=format&n=sqGJ0ONkT5kTuesy&q=85&s=131a37c06b410305b28cbd385646e164" alt="Send MMS" width="1446" height="774" data-path="images/send-mms-api.jpg" />
        </Frame>

        ### Prerequisites

        To get started, you need a Plivo account — [sign up](https://cx.plivo.com/signup) with your work email address if you don’t have one already. If this is your first time using Plivo APIs, follow our instructions to set up a Ruby development environment.

        ### Create the send MMS application

        Create a file called `send_mms.rb` and paste into it this code.

        ```rb theme={null}
        require 'rubygems'
        require 'plivo'

        include Plivo

        api = RestClient.new("<auth_id>","<auth_token>")
          response = api.messages.create(
            src:"<sender_id>",
            dst:"<destination_number>",
            text:"Hello, from Ruby!",
            media_urls:["[https://media.giphy.com/media/26gscSULUcfKU7dHq/source.gif](https://media.giphy.com/media/26gscSULUcfKU7dHq/source.gif)"],
            media_ids:["801c2056-33ab-499c-80ef-58b574a462a2"],
            type: "mms"
          )
        puts response
        ```

        Replace the auth placeholders with your authentication credentials from the [Plivo console](https://cx.plivo.com/home). Replace the phone number placeholders with actual phone numbers in [E.164 format](https://en.wikipedia.org/wiki/E.164) (for example, +12025551234). In countries other than the US and Canada you can use a [sender ID](/docs/messaging/concepts/sender-id-usage/) for the message source. You must have a Plivo phone number to send messages to the US or Canada; you can buy a Plivo number from Phone Numbers > [Buy Numbers](https://cx.plivo.com/phone-numbers) on the Plivo console or via the [Numbers API](/docs/numbers/phone-numbers#buy-a-phone-number).

        <Note>
          Note:
          We recommend that you store your credentials in the `auth_id` and `auth_token` environment variables to avoid the possibility of accidentally committing them to source control. If you do this, you can initialize the client with no arguments and Plivo will automatically fetch the values from the environment variables. You can use `ENV` to store environment variables and fetch them when initializing the client.
        </Note>

        ### Test

        ```shell theme={null}
        ruby send_mms.rb
        ```
      </Tab>
    </Tabs>
  </Tab>

  <Tab title="Python">
    ## Overview

    This guide shows how to send an MMS message to any phone number. Businesses can make messages more meaningful by using MMS instead of SMS and including images, audio, and video to provide context.

    You can start sending MMS messages either by using our PHLO visual workflow builder or our APIs. Follow the instructions in one of the tabs below.

    <Tabs>
      <Tab title="Using API">
        Here’s how to use Plivo APIs to send outbound MMS text messages.

        ### How it works

        <Frame>
          <img src="https://mintcdn.com/plivo/sqGJ0ONkT5kTuesy/images/send-mms-api.jpg?fit=max&auto=format&n=sqGJ0ONkT5kTuesy&q=85&s=131a37c06b410305b28cbd385646e164" alt="Send MMS" width="1446" height="774" data-path="images/send-mms-api.jpg" />
        </Frame>

        ### Prerequisites

        To get started, you need a Plivo account — [sign up](https://cx.plivo.com/signup) with your work email address if you don’t have one already. If this is your first time using Plivo APIs, follow our instructions to set up a Python development environment.

        ### Create the send MMS application

        Create a file called `send_mms.py` and paste into it this code.

        ```py theme={null}
        import plivo
        client = plivo.RestClient('<auth_id>','<auth_token>')

        response = client.messages.create(
            src='<sender_id>',
            dst='<destination_number>',
            media_ids=['801c2056-33ab-499c-80ef-58b574a462a2'],
            media_urls=['[https://media.giphy.com/media/26gscSULUcfKU7dHq/source.gif](https://media.giphy.com/media/26gscSULUcfKU7dHq/source.gif)'],
            type_='mms')
        print(response)
        ```

        Replace the auth placeholders with your authentication credentials from the [Plivo console](https://cx.plivo.com/home). Replace the phone number placeholders with actual phone numbers in [E.164 format](https://en.wikipedia.org/wiki/E.164) (for example, +12025551234). In countries other than the US and Canada you can use a [sender ID](/docs/messaging/concepts/sender-id-usage/) for the message source. You must have a Plivo phone number to send messages to the US or Canada; you can buy a Plivo number from Phone Numbers > [Buy Numbers](https://cx.plivo.com/phone-numbers) on the Plivo console or via the [Numbers API](/docs/numbers/phone-numbers#buy-a-phone-number).

        <Note>
          Note:
          We recommend that you store your credentials in the `auth_id` and `auth_token` environment variables to avoid the possibility of accidentally committing them to source control. If you do this, you can initialize the client with no arguments and Plivo will automatically fetch the values from the environment variables. You can use `os module(os.environ)` to store environment variables and fetch them when initializing the client.
        </Note>

        ### Test

        Save the file and run it.

        ```shell theme={null}
        python send_mms.py
        ```
      </Tab>
    </Tabs>
  </Tab>

  <Tab title="PHP">
    ## Overview

    This guide shows how to send an MMS message to any phone number. Businesses can make messages more meaningful by using MMS instead of SMS and including images, audio, and video to provide context.

    You can start sending MMS messages either by using our PHLO visual workflow builder or our APIs. Follow the instructions in one of the tabs below.

    <Tabs>
      <Tab title="Using API">
        Here’s how to use Plivo APIs to send outbound MMS text messages.

        ### How it works

        <Frame>
          <img src="https://mintcdn.com/plivo/sqGJ0ONkT5kTuesy/images/send-mms-api.jpg?fit=max&auto=format&n=sqGJ0ONkT5kTuesy&q=85&s=131a37c06b410305b28cbd385646e164" alt="Send MMS" width="1446" height="774" data-path="images/send-mms-api.jpg" />
        </Frame>

        ### Prerequisites

        To get started, you need a Plivo account — [sign up](https://cx.plivo.com/signup) with your work email address if you don’t have one already. If this is your first time using Plivo APIs, follow our instructions to set up a PHP development environment.

        ### Create the send MMS application

        Create a file called `SendMMS.php` and paste into it this code.

        ```php theme={null}
        <?php
        require 'vendor/autoload.php';
        use Plivo\RestClient;

        $client = new RestClient("<auth_id>","<auth_token>");
        $client->client->setTimeout(40);
            $mediaURLs = ["[https://media.giphy.com/media/26gscSULUcfKU7dHq/source.gif](https://media.giphy.com/media/26gscSULUcfKU7dHq/source.gif)"];
            $mediaIDs = ["801c2056-33ab-499c-80ef-58b574a462a2"];
            $response = $client->messages->create(
                [
                "src" => "<sender_id>",
                "dst" => "<destination_number>",
                "text" =>"Hello, from PHP!",
                "type" => "mms",
                "media_urls" => $mediaURLs,
                "media_ids" => $mediaIDs
            ]);
            print_r($response);
        ```

        Replace the auth placeholders with your authentication credentials from the [Plivo console](https://cx.plivo.com/home). Replace the phone number placeholders with actual phone numbers in [E.164 format](https://en.wikipedia.org/wiki/E.164) (for example, +12025551234). In countries other than the US and Canada you can use a [sender ID](/docs/messaging/concepts/sender-id-usage/) for the message source. You must have a Plivo phone number to send messages to the US or Canada; you can buy a Plivo number from Phone Numbers > [Buy Numbers](https://cx.plivo.com/phone-numbers) on the Plivo console or via the [Numbers API](/docs/numbers/phone-numbers#buy-a-phone-number).

        <Note>
          Note:
          We recommend that you store your credentials in the `auth_id` and `auth_token` environment variables to avoid the possibility of accidentally committing them to source control. If you do this, you can initialize the client with no arguments and Plivo will automatically fetch the values from the environment variables. You can use `process.env` to store environment variables and fetch them when initializing the client.
        </Note>

        ### Test

        Save the file and run it.

        ```shell theme={null}
        php SendMMS.php
        ```
      </Tab>
    </Tabs>
  </Tab>

  <Tab title=".NET">
    ## Overview

    This guide shows how to send an MMS message to any phone number. Businesses can make messages more meaningful by using MMS instead of SMS and including images, audio, and video to provide context.

    You can start sending MMS messages either by using our PHLO visual workflow builder or our APIs. Follow the instructions in one of the tabs below.

    <Tabs>
      <Tab title="Using API">
        Here’s how to use Plivo APIs to send outbound MMS text messages.

        ### How it works

        <Frame>
          <img src="https://mintcdn.com/plivo/sqGJ0ONkT5kTuesy/images/send-mms-api.jpg?fit=max&auto=format&n=sqGJ0ONkT5kTuesy&q=85&s=131a37c06b410305b28cbd385646e164" alt="Send MMS" width="1446" height="774" data-path="images/send-mms-api.jpg" />
        </Frame>

        ### Prerequisites

        To get started, you need a Plivo account — [sign up](https://cx.plivo.com/signup) with your work email address if you don’t have one already. If this is your first time using Plivo APIs, follow our instructions to set up a .NET development environment.

        ### Create the send MMS application

        In Visual Studio, in the CS project, open the file `Program.cs` and paste into it this code.

        ```cs theme={null}
        using System;
        using System.Collections.Generic;
        using Plivo;
        using Plivo.Exception;

        namespace SdkTestDotnet
        {
            class Program
            {
                static void Main(string[] args)
                {
                    var api = new PlivoApi("<auth_id>","<auth_token>");
                    try
                    {
                        var response = api.Message.Create(
                            src:"<sender_id>",
                            dst:new List<String>{"<destination_number>"},
                            text:"Hello, from .NET!",
                            type:"mms",
                            media_urls: new string[]{"[https://media.giphy.com/media/26gscSULUcfKU7dHq/source.gif](https://media.giphy.com/media/26gscSULUcfKU7dHq/source.gif)"},
                            media_ids: new String[]{"801c2056-33ab-499c-80ef-58b574a462a2"}
                        );
                        Console.WriteLine(response);
                    }
                    catch (PlivoRestException e)
                    {
                        Console.WriteLine("Exception: " + e.Message);
                    }
                }
            }
        }
        ```

        Replace the auth placeholders with your authentication credentials from the [Plivo console](https://cx.plivo.com/home). Replace the phone number placeholders with actual phone numbers in [E.164 format](https://en.wikipedia.org/wiki/E.164) (for example, +12025551234). In countries other than the US and Canada you can use a [sender ID](/docs/messaging/concepts/sender-id-usage/) for the message source. You must have a Plivo phone number to send messages to the US or Canada; you can buy a Plivo number from Phone Numbers > [Buy Numbers](https://cx.plivo.com/phone-numbers) on the Plivo console or via the [Numbers API](/docs/numbers/phone-numbers#buy-a-phone-number).

        <Note>
          Note:
          We recommend that you store your credentials in the `auth_id` and `auth_token` environment variables to avoid the possibility of accidentally committing them to source control. If you do this, you can initialize the client with no arguments and Plivo will automatically fetch the values from the environment variables. You can use the <a href="https://docs.microsoft.com/en-us/dotnet/api/system.environment.setenvironmentvariable?view=netcore-3.1">Environment.SetEnvironmentVariable</a> method to store environment variables and <a href="https://docs.microsoft.com/en-us/dotnet/api/system.environment.getenvironmentvariable?view=netcore-3.1">Environment.GetEnvironmentVariable</a> to fetch them when initializing the client.
        </Note>

        ### Test

        Save the file and run it.
      </Tab>
    </Tabs>
  </Tab>

  <Tab title="Java">
    ## Overview

    This guide shows how to send an MMS message to any phone number. Businesses can make messages more meaningful by using MMS instead of SMS and including images, audio, and video to provide context.

    You can start sending MMS messages either by using our PHLO visual workflow builder or our APIs. Follow the instructions in one of the tabs below.

    <Tabs>
      <Tab title="Using API">
        Here’s how to use Plivo APIs to send outbound MMS text messages.

        ### How it works

        <Frame>
          <img src="https://mintcdn.com/plivo/sqGJ0ONkT5kTuesy/images/send-mms-api.jpg?fit=max&auto=format&n=sqGJ0ONkT5kTuesy&q=85&s=131a37c06b410305b28cbd385646e164" alt="Send MMS" width="1446" height="774" data-path="images/send-mms-api.jpg" />
        </Frame>

        ### Prerequisites

        To get started, you need a Plivo account — [sign up](https://cx.plivo.com/signup) with your work email address if you don’t have one already. If this is your first time using Plivo APIs, follow our instructions to [set up a Java development environment](/docs/sdk/server/php-sdk/).

        ### Create the send MMS application

        Once you have the above prerequisites set, You can follow the below instructions to create an app to send an outbound MMS to deliver your message.

        Create a Java class called `SendMMS` and paste into it this code.

        ```java theme={null}
        package com.plivo.api;
        import java.io.IOException;
        import com.plivo.api.exceptions.PlivoRestException;
        import com.plivo.api.models.media.Media;

        public class SendMMS {
            public static void main(String[] args) {
              Plivo.init("<auth_id>", "<auth_token>");
                MessageCreateResponse response = Message.creator("<sender_id>",Collections.singletonList("<destination_number>"),
                  "Hello, from Java!").type(MessageType.MMS)
                  .media_urls(new String[]{"[https://media.giphy.com/media/26gscSULUcfKU7dHq/source.gif](https://media.giphy.com/media/26gscSULUcfKU7dHq/source.gif)"})
                  .media_ids(new String[]{"801c2056-33ab-499c-80ef-58b574a462a2"})
                  .create();
                System.out.println(response);
              }
            }
        ```

        Replace the auth placeholders with your authentication credentials from the [Plivo console](https://cx.plivo.com/home). Replace the phone number placeholders with actual phone numbers in [E.164 format](https://en.wikipedia.org/wiki/E.164) (for example, +12025551234). In countries other than the US and Canada you can use a [sender ID](/docs/messaging/concepts/sender-id-usage/) for the message source. You must have a Plivo phone number to send messages to the US or Canada; you can buy a Plivo number from Phone Numbers > [Buy Numbers](https://cx.plivo.com/phone-numbers) on the Plivo console or via the [Numbers API](/docs/numbers/phone-numbers#buy-a-phone-number).

        <Note>
          Note:
          We recommend that you store your credentials in the `auth_id` and `auth_token` environment variables to avoid the possibility of accidentally committing them to source control. If you do this, you can initialize the client with no arguments and Plivo will automatically fetch the values from the environment variables. You can use <a href="https://docs.oracle.com/javase/tutorial/essential/environment/env.html">System.getenv()</a> to store and retrieve environment variables when initializing the client.
        </Note>

        ### Test
      </Tab>
    </Tabs>
  </Tab>

  <Tab title="Go">
    ## Overview

    This guide shows how to send an MMS message to any phone number. Businesses can make messages more meaningful by using MMS instead of SMS and including images, audio, and video to provide context.

    You can start sending MMS messages either by using our PHLO visual workflow builder or our APIs. Follow the instructions in one of the tabs below.

    <Tabs>
      <Tab title="Using API">
        Here’s how to use Plivo APIs to send outbound MMS text messages.

        ### How it works

        <Frame>
          <img src="https://mintcdn.com/plivo/sqGJ0ONkT5kTuesy/images/send-mms-api.jpg?fit=max&auto=format&n=sqGJ0ONkT5kTuesy&q=85&s=131a37c06b410305b28cbd385646e164" alt="Send MMS" width="1446" height="774" data-path="images/send-mms-api.jpg" />
        </Frame>

        ### Prerequisites

        To get started, you need a Plivo account — [sign up](https://cx.plivo.com/signup) with your work email address if you don’t have one already. If this is your first time using Plivo APIs, follow our instructions to set up a Go development environment.

        ### Create the send MMS application

        Create a file called `SendMMS.go` and paste into it this code.

        ```go theme={null}
        package main

        import (
            "fmt"
            plivo "[github.com/plivo/plivo-go/v7](https://github.com/plivo/plivo-go/v7)"
        )

        func main() {

            client, err := plivo.NewClient("<auth_id>","<auth_token>",
                &plivo.ClientOptions{})
            if err != nil {
                panic(err)
            }
            createResp, err := client.Messages.Create(plivo.MessageCreateParams{
                Src: "<sender_id>",
                Dst:  "<destination_number>",
                Text: "Hello, from Go!",
                Type: "mms",
                MediaUrls: []string{"[https://media.giphy.com/media/26gscSULUcfKU7dHq/source.gif](https://media.giphy.com/media/26gscSULUcfKU7dHq/source.gif)"},
                MediaIds: []string{"801c2056-33ab-499c-80ef-58b574a462a2"},
            })
            if err != nil {
                panic(err)
            }
            fmt.Printf("Response: %#v\n", createResp)
        }
        ```

        Replace the auth placeholders with your authentication credentials from the [Plivo console](https://cx.plivo.com/home). Replace the phone number placeholders with actual phone numbers in [E.164 format](https://en.wikipedia.org/wiki/E.164) (for example, +12025551234). In countries other than the US and Canada you can use a [sender ID](/docs/messaging/concepts/sender-id-usage/) for the message source. You must have a Plivo phone number to send messages to the US or Canada; you can buy a Plivo number from Phone Numbers > [Buy Numbers](https://cx.plivo.com/phone-numbers) on the Plivo console or via the [Numbers API](/docs/numbers/phone-numbers#buy-a-phone-number).

        <Note>
          Note:
          We recommend that you store your credentials in the `auth_id` and `auth_token` environment variables to avoid the possibility of accidentally committing them to source control. If you do this, you can initialize the client with no arguments and Plivo will automatically fetch the values from the environment variables. You can use `os.Setenv` and `os.Getenv` functions to store environment variables and fetch them when initializing the client.
        </Note>

        Save the file and run it.

        ```shell theme={null}
        go run SendMMS.go
        ```
      </Tab>
    </Tabs>
  </Tab>
</Tabs>
