List Callback Listeners

Get a list of registered callback types and endpoints:
GET /callbacks

Returns the type and endpoint URL of the callback listening services registered by the current user.

Contents

See also:
About SMS API Callbacks
Register a Callback Listener
Deregister a Callback Listener

Request Components

HTTP Request

GET https://thingspace.verizon.com/api/messaging/v1/callbacks

Resource Path and Query Parameters

You can use query parameters to filter the list by either long code or callback type. If you don’t provide either parameter, the response will include all callbacks endpoints registered by the current user.

Parameter Name Data Type Description
callbackType
optional
string Filter the response to only include registered endpoints for a specific callback type:
  • Default
  • SMS_DeliveryReport
  • SMS_MobileOriginatedMessage
  • OptIn
  • OptOut
code
optional
string Filter the response to only include registered callbacks for this long code.

Header Parameters

The request header must contain a current ThingSpace authorization bearer token.

Parameter Name Data Type Description
Authorization
required
string HTTP Authorization request header.

Request Body

None.

Success Responses

Status 200

A success response includes an array of registered callback endpoints that match the request criteria.

Parameter Name Data Type Description
callbackType string The type of callback messages that will be sent to the registered URL:
  • Default
    description
  • SMS_DeliveryReport
    Reports of message delivery to devices, in response to POST /query/deliveryStatus requests.
  • SMS_MobileOriginatedMessage
    Messages sent by devices to the short code specified in code.
  • OptIn
    Notifications when devices opt-in to the service identified by code.
  • OptOut
    Notifications when devices want to stop receiving messages provided by code.
code string The long code for the service that receives callbacks at the registered URL.
url string The endpoint on your server where you have enabled a listening service for the specified type of callback requests.
username string The username defined when a URL was registered for the callback service, or an empty string if no username was defined. The user name that the ThingSpace Platform should return in the callback messages.
password string The password that the ThingSpace Platform should return in the callback messages.

The response body will be empty if there are no callback services registered with the account that match the query parameters.

Example Success Response

{ 
  "callbacks": [
    {
      "code": "9038644951",
      "url": "http://10.120.102.183:50559/userRegistration.asmx",
      "username": "Zaffod",
      "password": "A14:93r6k",
      "callbackType": "OptIn"
    },
    {
      "code": "9038644951",
      "url": "http://10.120.102.183:50559/userRegistration.asmx",
      "username": "Zaffod",
      "password": "A14:93r6k",
      "callbackType": "OptOut"
    },
    {
      "code": "9038644951",
      "url": "http://10.120.102.183:50559/CallbackListener.asmx",
      "username": "Zaffod",
      "password": "A14:93r6k",
      "callbackType": "Default"
    }
  ]
}

Failure Responses

Status 400

All error messages are returned in this format:

{
  "error": "The type of error, such as INVALID_REQUEST.",
  "error_description": "Additional error information.",
  "error_url": "Optional URI with more information about the error."
}

The error_url field will not be present if there is no URI for more information.

Error codes and messages are listed on the Status Codes page, along with explanations and suggestions for corrective actions.

Try It Out!