How do I create a Messaging API application?

Follow

Andrey

Updated

If you're a Messaging user, you can find everything you need to start sending text messages on the Applications page in the Bandwidth App:

  • Messaging URI: The endpoint for all 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 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 to create applications and send messages.

To create a messaging API application:

  1. Log in to the Bandwidth App.
  2. In the side navigation bar, click Applications and select Applications.
  3. Under Application name, enter a name for your Application.
  4. Leave the Application ID field blank – we create this for you.
  5. Under Application typeselect Messaging.

create-application.png

As you create your Application, you must decide whether 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, complete the following steps:

  1. Leave the checkbox for Use multiple callback URLs blank.
  2. Enter your Callback URL. Bandwidth will make an HTTP request to this URL whenever a messaging event takes place.
  3. Select Use a username/password for callbacks (optional).
  4. Select your status callback types.

single-callback.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), complete the following steps:

Note: If you choose to set up multiple callback URLs, you'll be presented with two additional fields: Inbound Callback URL and Status Callback URL. If you don't set up a Status Callback URL, you won’t receive any callback events for outbound messages. 

  1. Check the Use multiple callback URLs checkbox.
  2. Set your Inbound Callback URL (required) and Status Callback URL (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.
  3. Select Use a username/password for callbacks (optional) for either or both callback URLs.
  4. Select your status callback types.

multiple-callbacks.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:

  1. Click Create Application in the bottom right corner.
  2. Connect the Application to a Location. To do that, you can either create a new Location or associate an existing Location with your Application.
  3. Copy your Application ID. This is required to send outbound messages. You may also secure your callbacks with basic authentication.

Note: Associating your Application with a Location allows it to send the appropriate callback to the specified Callback URL whenever a phone number receives a messaging event.

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

Article is closed for comments.