POST /callbacks/{accountname}
Registers a URL at which an account receives asynchronous responses and other messages from a ThingSpace Platform callback service. The messages are 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 originate from one of these IP addresses:
POST https://thingspace.verizon.com/api/m2m/v1/callbacks/{accountname}
The account name must be included in the path.
Parameter Name | Data Type | Description |
---|---|---|
accountname 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 a current ThingSpace authorization bearer token and a valid VZ-M2M session token, and must set the content-type to JSON.
Parameter Name | Data Type | Description |
---|---|---|
Authorization required |
string | HTTP Authorization bearer token. |
VZ-M2M-Token required |
string | A valid session token returned by POST /session/login. |
Content-Type required |
string | Must be application/json . |
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:
NOTE: You cannot register a callback service through the REST API if the same callback service has been registered through the SOAP API. |
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. Do not use your UWS/M2M username, or any other username that you want to remain private or secret. NOTE: Must be 40 characters or fewer. |
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. Do not use your UWS/M2M password, or any other password that you want to remain private or secret. NOTE: Must be 40 characters or fewer. |
{
"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 are sent. |
serviceName | string | The name of the callback service, which identifies the type and format of messages that are 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.