How do I create a Messaging API application?

Follow

Chase Greiser

Updated

If you're a Messaging user, you can find everything you need to get started with sending text messages on the Applications page in the Bandwidth Dashboard:

  • Messaging URI: The endpoint for all of your Messaging APIs to send and receive messages. This path includes your company’s unique user ID. It's the value that follows the users/ resource.
  • API Credentials: Bandwidth APIs use BASIC HTTP Authentication. You'll need to have your Account ID and API User Credentials to make API calls.
  • Developer Docs: Get dialed in with code samples, set-up guides, and more. Visit our API documentation for creating applications and sending messages.

To create a messaging API application:

  1. Log into the Bandwidth Dashboard.
  2. From the top navigation bar, click Applications.
  3. On the New Application form, enter an Application name.
  4. Leave the Application ID field blank. We'll create this for you.
  5. If applicable, select Messaging as your Application Type.

As you’re creating your Application, you have an important decision to make: Do you want to have a single or multiple callback URLs? Check out the steps for each option below. 

Single callback

If you’d like your inbound and status events to be delivered to the same endpoint, perform the following steps:

  1. Leave the checkbox for Use multiple callback URLs unchecked.
  2. Set your Callback URL. Bandwidth will make an HTTP request to this URL whenever a messaging event takes place.
    • Optional: Select Use a username/password for callbacks.
  3. Next, set your Status Callback Types.

MC_SS_2_.png

Multiple callbacks

If you’d like to move your status callback events to separate endpoints (one for inbound messages and one for outbound messages), perform the following steps:

Note: If you choose to set up multiple callback URLs, you will have two input boxes: Inbound Callback (required) and one for Status Callback (optional). If you do not set up a URL for Status Callback then you won’t receive any callback events for outbound messages. 

  1. Check the Use multiple callback URLs checkbox.
  2. Set your Inbound Callback (required), and then your Status Callback (optional). Bandwidth will make an HTTP request to your Inbound Callback URL whenever a message-received event takes place and an HTTP request to your Status Callback URL whenever one of the selected status callback types occurs.
    • Optional: Select Use a username/password for callbacks.

Note: If you don’t set up a URL for Status Callback, then you won’t receive any callback events for outbound messages. 

MC_SS1_.png

Status callback types

You can select which callback events you receive via HTTP request from the options listed on the page. All three of these callback types will be selected as default. To learn more about them, check out the links below. 

To finish updating your callbacks, perform the following steps:

  1. Click Create Application in the bottom right corner to save your changes.
  2. Connect the application with a location. You can either create a new location or associate an existing location with your application.
    • Note: Associate your application with a location so that when a phone number receives a messaging event, the application will send the appropriate callback to the specified Callback URL.

Copy your Application ID. This is required to send outbound messages. You may also secure your callbacks with basic authentication.

Questions? Please open a ticket with your Bandwidth Support Team or hit us up at (855) 864-7776!

Article is closed for comments.