POST /callbacks/{aname}
Registers a URL at which an account will receive asynchronous responses and other messages from a ThingSpace Platform callback service. The messages will be REST messages. You are responsible for creating and running a listening process on your server at that URL to receive and parse the messages.
See also:
About ThingSpace Callback Services
List Callback Listeners
Deregister a Callback Listener
All Verizon callbacks will originate from either of these two IP addresses:
POST https://thingspace.verizon.com/api/m2m/v1/callbacks/{aname}
The account name must be included in the path.
Parameter Name | Data Type | Description |
---|---|---|
aname required |
string | The name of the billing account for which you want to receive callback messages. An account name is usually numeric, and must include any leading zeros. Note: Use “TestAccount-2” when trying this request with the simulator. |
The request header must contain the current session token.
Parameter Name | Data Type | Description |
---|---|---|
VZ-M2M-Token required |
string | A valid session token returned by POST /session/login. |
The body specifies the callback service that you are subscribing to and the URL where the listening service is running.
Parameter Name | Data Type | Description |
---|---|---|
name required |
string | The name of the callback service that you want to subscribe to. Set this to one of the following values:
|
url required |
string | The address on your server where you have enabled a listening service for callback messages. Specify a URL that is reachable from the Verizon data centers. If your service is running on HTTPS, you should use a one-way authentication certificate with a white-listed IP address. In most cases, you should register each service type to a unique a URL address. |
username optional |
string | The user name that the M2M Platform should return in the callback messages. If you are handling multiple accounts and you want them to use the same callback address, you can use this credential to identify the account that a particular message is associated with. Pass an empty element if you don’t want to include a username for this account and service type. |
password optional |
string | The password that the M2M Platform should return in the callback messages. Pass an empty element if you don’t want to include a password for this account and service type. |
{
"name": "CarrierService",
"url": "http://10.120.102.183:50559/CallbackListener/CarrierServiceMessages.asmx"
}
Status 200
Parameter Name | Data Type | Description |
---|---|---|
accountName | string | The name of the billing account for which callback messages will be sent. |
serviceName | string | The name of the callback service, which identifies the type and format of messages that will be sent to the registered URL. |
{
"accountName": "122333444-00002",
"serviceName": "CarrierService"
}
Status 400
All error messages are returned in this format:
{
"errorCode": "error code string",
"errorMessage": "error message string"
}
Error codes and messages are listed on the Error Messages page, along with explanations and suggestions for corrective actions.
Try It Out!