HTTPS API v2 / Incomming messages
Another feature available through remote access is the ability to download responses received from the recipients client, SMS messages sent within the service access number and the individual access number.
Calling address
To retrieve reply to messages and other incoming messages using remote service, call the specified URL using POST.
messages/recived
Available parameters
Parameter | Type | An example value or format | Description |
---|---|---|---|
username | String | Login | Username to the account |
password | String | Haslo |
Password to the account |
phone | String|Array | %2B48500600700 |
The number or telephone numbers provided in the table. |
date_from oraz date_to | DateTime | ISO eg. „2014-10-24 17:46:00” |
The time interval to be displayed. This is the date and time of sending the message. |
type | String | eco|nd|ndi|pre|mms | The type of message to be displayed. If the parameter is left blank will be returned incoming messages from all categories. |
ndi | String | Number NDI in format +48500600700 | An optional parameter allows you to filter out the incoming messages, which hit a certain number of NDI (if eg. A customer has several numbers on one account). |
read | Boolean | true, false or none | That means a message as read (no more returned by the API). |
show_contact | Boolean | true, false or none |
Display contact details if the number exists in the database of customers. |
The parameters in bold are obligatory. Others are optional.
Return response
{
"items":[{
"id":2477793,
"type":"eco",
"phone":"+48500600700",
"recived":"2014-10-21 11:18:03",
"message_id":"eba39e4fe1",
"blacklist":false,
"text":"Przyjade o 16"
},
{
"id":303023,
"type":"nd",
"phone":"+48500600700",
"recived":"2014-10-21 12:37:43",
"blacklist":false,
"text":"SerwerSMS.pl"
},
{
"id":2204974,
"type":"ndi",
"phone":"+48500600700",
"recived":"2014-10-21 16:47:36",
"blacklist":false,
"text":"Dziękuję za informację"
},
{
"id":323961872,
"type":"mms",
"phone":"+48500600700",
"recived":"2014-10-21 14:09:15",
"to_number":"+48664078059",
"blacklist":false,
"title":"Temat MMS",
"attachments":[{
"id":2518,
"name":"text_0002.txt",
"content_type":"text/plain",
"data":"SmFrYXMgdGFtIGplc3pjemUgd2lhZGFvbW9zYw=="
}]
}]
}
Explanation of individual parameters feedback
Parameter | Description |
---|---|
id | ID message. |
type | Specifies the type of the received message. Values: eco, nd, ndi, pre, mms. |
phone |
The number of the SMS sender. |
recived |
Date of dispatch of the message. |
message_id | ID sent message ECO affected by this answer. |
to_number | The number to which the message was sent (for MMS). |
blacklist |
Information, whether the number is on the blacklist. |
text | Message content. |
title |
Title of the message (for MMS). |
attachments |
Contains a list of attachments consisting of ID number, name (name), file type (content_type) and its content encoded in base64 (date). |
Forwarding of incoming messages to a predefined URL Client
Suitable options are available in the Customer Panel:
Replies ECO: Settings interface> HTTPS XML API> SMS response ECO
ND / SC: Message settings> Numbers ND / SC> [chosen password / prefix]> Forward
NDI / SCI: Message settings> Numbers NDI / SCI> [chosen password / prefix]> Forward
MMS: Receiving Messages> Inbox MMS> Additional Options
The most common one-time setup is required.
Before sending information to the client, these parameters are changed with the data for a specific message. The system invokes the client's URL by changing the parameters to appropriate values and depending on the settings, it can verify whether the receipt of messages on the client's side has taken place correctly. If the verification option is enabled and the script on the client side does not return the required values, the system will repeat the URL invocation in 5, 10, 15 and 60 minutes. If, for whatever reason, the message is not transmitted correctly, you can download a list of new messages at any time via the HTTPS API query. Information about responses to SMS ECO+ +, ND / SC and NDI / SCI is sent via the GET method. For MMS messages, data is sent via POST method.
Recommended settings
It is recommended that incoming messages were sent to the URL of the Client, which is defined in the Customer Panel. This option is available for all services which answers ECO, ND, NDI, SC, SCI, PR, PRI. In case of failure to transmit a message to the URL, the renewed dispatch messages to the customer will take place one after 5, 10, 15 and 60 min. If you still fail to convey the message to the customer, the system will not undertake more attempts. Messages are, however, still available from the Customer Panel and API.