Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Please make sure you have provided CONNECT Support an URL where Common shall deliver your messages.
Please make an opening in your firewall if necessary, so that Common can connect to your system. For a list of the addresses Common will connect from, see below.
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
This document will describe the Application Programming Interface (API) to receive text messages through the CONNECT “Common” platform. Sending messages is described in a separate document.
...
Messages will be delivered in JSON format. A basic familiarity with JSON is assumed.
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Common is a high-capacity, high-availability SMS gateway designed to let you send and receive SMS Text messages. Messages can contain any character in the UTF-8 2-byte character set.
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Mobile Originated message. Refers to any text message sent from an end-user’s handset to you.
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
When delivering a message to you, the requests can be coming from several different IP addresses.
...
Please configure your firewalls so that these hosts/networks can connect to your systems to deliver messages.
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
All communication to and from Common will be in UTF-8 encoding.
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Contains parameters and values in a JSON object.
Anchor | ||||
---|---|---|---|---|
|
...
Contains parameters and values in a Jason object.
Code Block |
---|
{
"key1": "value1",
"key2": "value2"
} |
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
When Common forwards an MO message to you, it will be POST:ed to your service, in either XML or JSON formats. The format is described in the following table:
...
route parameter | Data type | Description |
type | String | Contains information on how the message was routed to you. Contains KEYWORD_ROUTE if the message matched a keyword, or SUBNUMBER_ROUTE if the message matched a subnumber. |
id | String | The ID of either the subnumber or the keyword matched. |
refId | String | A reference ID for this keyword or subnumber route. This string can be set by Support if you want to use it for routing internally. |
gateIds | <List>String | A list of the gate(s) this keyword or subnumber forwards to. |
platformId | String | The platformId of the platform which received this message. Will usually be “SMSC”. |
platformPartnerId | String | Your partnerId |
platformServiceType | String | Can be set to any string by Support. Used to differentiate different types of services on your end, if needed. |
platformServiceId | String | Can be set to any string by Support. Used to differentiate different services on your end, if needed. |
customParameters | KeyValue | Any custom parameters needed for this message. Usually blank. |
number | String | The shortnumber this routing rule applies to. |
startRange | String | Only if subnumbers are used. Contains the start of the range of subnumbers matched. |
stopRange | String | Only if subnumbers are used. Contains the end of subnumbers matched. |
keyword | String | Only if keyword is used. Contains the keyword that was matched. |
keywordType | String | Contains the type of matching used for this keyword. Support will advise you on the different types of keyword types when setting up the keyword, if needed. |
active | Boolean | Whether the keyword is active. Will always be true. |
start | DateTime | The start date of the keyword. Will always be in the past. |
end | DateTime | The expiry date of the keyword. Will always be in the future. |
shared | Boolean | Whether this keyword will forward to multiple services. With the exception of STOP services, this will always be false. |
description | String | Human-readable description of the service. |
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
For most purposes, you are mainly interested in the “source”, “route”:”keyword”, and “content”:”userData” fields. Other fields are included for advanced or debugging purposes.
In these examples, some ID numbers have been replaced with 0.
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
This example is an example of a user with phone number +4741560067 sending a message to shortnumber 2333 with the text “Bclt hello”. Anchor
...
...
This example shows how the request will look when the message is sent to a subnumber rather than a keyword. This example is sent from +4741560067 to shortcode 2333, subnumber 9999999989. The text of the message is “Hello, Dolly!”
...
Code Block |
---|
{
"destination": "NO-2333",
"subNumber": null,
"source": "+4741560067",
"content": {
"type": "SMS",
"userData": "Bclt hello",
"encoding": "TEXT"
},
"operator": "no.telenor",
"timestamp": "2015-11-17T14:28:40Z",
"messageId": "0",
"operatorTimestamp": "2015-11-17T14:28:40Z",
"operatorMessageId": "0",
"route": {
"type": "KEYWORD_ROUTE",
"id": "0",
"refId": "Internal Keyword Reference",
"gateIds": ["0"],
"platformId": "0",
"platformPartnerId": "0",
"platformServiceType": "serviceType",
"platformServiceId": "Internal Service ID",
"customParameters": {},
"number": "NO-2333",
"keyword": "BCLT",
"keywordType": "FIRST_WORD",
"active": true,
"start": "2015-11-17T00:00:00Z",
"end": "2016-11-17T00:00:00Z",
"shared": false,
"description": "BCLT service"
},
"gateCustomParameters": {},
"customParameters": {
"platformPartnerId": "0",
"suggestedOperator": "no.telenor",
"moReferenceId": "0",
"queued": "2015-11-17 15:28:40",
"serviceCentreTimeStamp": "20151117152840",
"platformId": "0"
}
} |
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
The following hosts are currently used for outgoing messaging.
...