MMS Gateway - Bandwidth
The Bandwidth MMS Gateway currently delivers MMS messages to USA and Canadian phone numbers. You can use the following methods for attaching media files to your outgoing messages:
- Public URL: simply enter the publicly accessible URL for each media file that you wish to send. You would typically upload the file (jpeg, png etc) to a server and determine the URL to that file and enter this into the URL field when sending an MMS message.
- Gateway Direct: fmMMS will upload the file stored in the FileMaker container field directly to Bandwidth who will store the media for 48 hours. This effectively means that the URL that is returned for uploaded media should not be re-used in future outgoing messages (unless within the 48 hours before automatic deletion).
You can get further information on supported media files and limitations here:
https://support.bandwidth.com/hc/en-us/sections/360000774614-MMS
Incoming Messages/Replies
You can get incoming messages/replies to your Bandwidth number into the fmMMS file in a number of ways:
- Use Webhooks to have Bandwidth push these automatically to fmMMS
- Use Otto Webhooks
Using Webhooks is the preferred method as it saves you from having to poll/check for any new messages - with Webhooks new messages are forwarded to fmMMS automatically by Bandwidth as they are received.
Bandwidth Webhooks Setup
To receive incoming MMS messages to your Bandwidth number, including replies to previously sent messages, you will need to use the supplied WebhooksCallbacks.php webhook file to act as the webhook receiver. See our Webhooks guide for what you need to do host the WebhooksCallbacks.php file on your chosen web server. Once you have the publicly accessible URL for this file you can enter this into your Bandwidth account settings as follows:
- login to your Bandwidth account via their website
- from the top navigation menu click Applications
- click on the Application you wish to enter the Callback URL for
- enter the URL in the Callback URL field
- click Save
The following screenshot shows an Application with the Callback URL field where you enter your URL:
Bandwidth Otto Webhooks Setup
Please visit the Webhooks using Otto guide for instructions on setting up Otto Webhooks for your Bandwidth number. You will need to create a new webhook and enter the Otto webhook URL using the instructions above and modify the OttoReceiver script to handle incoming MMS messages from Bandwidth.