The simplest way to send an MMS message is strip it down to just the HTTP POST and use a simple tool like cURL to send it. To make this easier for you, we’ve provided you with two executable code sample .zip files, which can be downloaded and edited for your ease of use.

Copy-and-paste warning

Remember: SOAP-based protocols are highly dependent on formatting of your calls. Because of this, you should not simply copy-and-paste Example One: sampleHeader.txt or Example Two: sampleBody.txt as they appear on this page. If you do so, the code will lose any full carriage return (/r/n) characters from the example, which will make the code incorrect.

Instead of copying and pasting, please, download the Curl examples and do not remove any carriage return or line feed characters from it. Remember, with SOAP-based protocols, every line and space matters!

👍

CURL tip

Since an MM7 call can get bulky, we recommend writing your header values and post body into separate files and use Curl command line arguments to load them. This is what we’ve done for the sake of this example.

Header

This example includes an image. In order to use this code, To use the code, you will need to change the following elements:

  • Authorization: This header value expects a Basic authorization string which is "Basic" + space + your username:password base 64 encoded.
  • X-Vibes-CarrierCode: Enter a valid carrier code for the carrier of the phone to which you will be sending the message, if known. Otherwise, the carrier is looked up.
  • X-Vibes-DlrCallbackUrl: The URL to which Delivery Reports should be sent. Learn more about how your delivery receipt options.

For a full list of header elements, please see send an MMS.

One more time...

Again, each new line should be a full carriage return (/r/n). This is very important for the code to run correctly.

Instead of copying-and-pasting, we recommend download the .zip files.

MIME-Version: 1.0
Content-Type: multipart/related; type="text/xml"; start="<rootpart>"; boundary="----=_Part_2_1764018763.1515602889819"
Authorization: Basic <<insert base 64 encoded username:password>>
X-Vibes-CarrierCode: <<insert vibes carrier code>>
Accept-Encoding: gzip,deflate
Accept:
Expect:
SOAPAction:

Delivery Report Request Options

The X-Vibes-DlrCallbackUrl information can be set or not set backed on your preference. The table below specifies how the Multimedia Message Service Center (MMSC) would process the various delivery report request options.

X-Vibes-DlrCallbackUrl Header SetX-Vibes-DlrCallbackUrl Header Not Set
Delivery Report Flag Set to trueDelivery Reports will be requested from the carrier, and any final status report returned from the carrier is sent to the Callback URL.Delivery Reports are requested from the carrier, but no callbacks are sent to the client.
Delivery Report Flag Set to falseThe delivery status of the message to carrier is returned to the Callback URL. Delivery Reports are not requested from the carrier.Delivery reports are not requested from the carrier, and no callbacks are sent to the client.

Body

This example includes an image, a text attachment, and a SMIL file. To use the code, you will need to change the following elements:

  • ShortCode: Enter a valid Vibes-provisioned shortcode with MMS enabled.
  • Recipients > Number: Enter a valid E.164 formatted phone number (for US +1XXXYYYZZZZ).

For a full list of body elements, please see send an MMS.

------=_Part_1_1764018763.1515602889819
Content-Type: text/xml; charset=utf-8
Content-Transfer-Encoding: 8bit
Content-ID: <rootpart>
 
<?xml version="1.0" encoding="utf-16"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Header>
        <TransactionID xmlns="http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-2">ea92fdc3-44e9-466a-9c40-f51a704a2590</TransactionID>
    </soapenv:Header>
    <soapenv:Body xmlns:ns3="http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-2">
        <ns3:SubmitReq xmlns="http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-1-2">
            <ns3:MM7Version>5.3.0</ns3:MM7Version>
            <ns3:SenderIdentification>
                <ns3:SenderAddress>
                    <ns3:ShortCode> <<YOUR SHORTCODE>> </ns3:ShortCode>
                </ns3:SenderAddress>
            </ns3:SenderIdentification>
            <ns3:Recipients>
                <ns3:To>
                    <ns3:Number><<YOUR E164 FORMAT PHONE NUMBER>></ns3:Number>
                </ns3:To>
            </ns3:Recipients>
            <ns3:DeliveryReport>true</ns3:DeliveryReport>
            <ns3:Subject>Vibes Testing</ns3:Subject>
            <ns3:Content href="cid:attachment.cid"/>
        </ns3:SubmitReq>
    </soapenv:Body>
</soapenv:Envelope>
------=_Part_1_1764018763.1515602889819
Content-Type: multipart/related; boundary="----=_Part_1_508319571.1515623980041"; type="image/jpeg; name=icon_market.jpg"; start="<icon_market.jpg>"
Content-Transfer-Encoding: binary
Content-ID: <attachment.cid>
 
------=_Part_1_508319571.1515623980041
Content-Type: image/jpeg; name=icon_market.jpg
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=icon_market.jpg
Content-ID: <image.cid>
 
/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAYEBAQFBAYFBQYJBgUGCQsIBgYICwwKCgsKCgwQDAwM
DAwMEAwODxAPDgwTExQUExMcGxsbHCAgICAgICAgICD/2wBDAQcHBw0MDRgQEBgaFREVGiAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICD/wAARCAAyADIDAREA
AhEBAxEB/8QAHAAAAgIDAQEAAAAAAAAAAAAABQYABAIDBwEI/8QAMhAAAQMCBQIDBgYDAAAAAAAA
AQIDBAAFBhESEyEiMRRBUQcVMjNxoVJhYpGS4RZC0v/EABkBAQEBAQEBAAAAAAAAAAAAAAABBQQG
A//EACURAQABAwQCAQUBAAAAAAAAAAABAgMRBRIhMQRxYRNRgaHB0f/aAAwDAQACEQMRAD8A+qaD
WiTHWCUOoUB3IUDQIX+V+0a9peuOErbbjZWlrRHVcXHUvy9s6SpnbyQgEgga6A7gXGkfFVrdf8Ou
BcoLyol1trvzI8hHdJ7Zg9waBkoJQSgWcY4ldtbHh2o7hW6nmTpO2gHg9XbVQcxvGK5LTbUa3IQ5
cJRKWtfwIH+y1ZelVA6Pj3GODlRfekhmRh1ag0p6Knb8KVHpJb+Hbz9B/cU52KU1bMR3e/sO7j99
EfxrKtIa1RkFCFoCQMiUnq750D/Y70Lo24rb0FogHI5g5/tQE6CUGK6APPw5YZi9cq3sLdHAd0AO
c/rGSvvQLmIPZBh682uTBDr0NMlso6VbgGfY5LzPB570ARPs3vVtiMRY1wblmO2lordSppStAyz4
3Bzl60RZsOIvdDZju8LWrNX1HFFPdovDc1sKSaApQSgGXW+NW0AOo3HVctpSe49T6Vn+ZqEWO4zI
EsYsdde3VxhtsoOrSsZ5KI56ss6zLeszVVmaeIj7+gZbVFuTAkRV9+/19CPI1u2PIou07qehx/FM
ZxFxIHdEh5tWX5K/qvsH/A0ZxEVJVQONBispHxHKgWcQNtmWJhmhph5raGgFwqA+JPHTlz5mvO6n
RG/fvxTMY459/H7ATftLXy465B/E8rSP4o/6rI+pYp6pmr3P8j/UXLZfXUydk6I0Z4FCtpATpKuA
vPvwfU11eJqExVt4ppq44jGPn8BZmRHXLoqE51PofUp1XfkEjv8AmTXqrEVRbiKu4hXSrHDEeIgZ
eVfUE6CvPgR50csP56D+ElJ7ZeX1qTGYwFp3AIRFcjwri8hCiFoS8A4EqHplo7jis2rS6Nk0x1PP
qQFfwji+N8tLE1PloXoV+y9I+9ZNzRLkdYkC5D1xhnKfb32P1lBKf5DMfeuC54F2nuJQw4YtXi3f
eS+rf6kqPmK9d4UzNmnPeFPCEhKQBXUMqCUEoJQV5AFB7HAyoN9BKD//2Q==
------=_Part_1_508319571.1515623980041--
------=_Part_1_1764018763.1515602889819--

Curl Command

Once your header and body files are completed, you can send the message with the following command:

curl -H @sampleHeader.txt --data-binary @sampleBody.txt https://messageapi-mms.vibesapps.com/mms/mm7/submit

📘

Versioning

The Curl version needed for the Samples must be at least 7.61.0.

Sample Files

You can download the sample files below to make it easier to use them.