SMS API

DecisionTelecom SMS API le permite enviar mensajes SMS a cualquier país del mundo a través de API. Cada mensaje se identifica mediante una identificación aleatoria única, por lo que los usuarios siempre pueden verificar el estado de un mensaje utilizando un punto final determinado.

La API de SMS utiliza HTTPS con clave de acceso que se utiliza como autorización de la API. Las cargas útiles de solicitud y respuesta se formatean como JSON con codificación UTF-8 y valores codificados en URL.

Autorización API: clave de acceso Base64.

Póngase en contacto con su administrador de cuenta para obtener una clave API.

Enviar SMS

https://web.it-decision.com/v1/api/send-sms
{
    "phone":380632132121,
    "sender":"InfoItd",
    "text":"This is messages DecisionTelecom",
    "validity_period":120
}

Response:

{
    "message_data": [
        {
            "message_id": 26348338,
            "phone": 380632132122,
            "part_count": 1,
            "concat_part": 1,
            "status": "ACCEPTD"
        }
    ]
}

Estado SMS

https://web.it-decision.com/v1/api/status?message_id=234234234

Response:

{
    "message_id": 26348265,
    "status": "DELIVRD"
}

Parámetros:

message_id: int - una identificación aleatoria única que se crea en la plataforma DecisionTelecom.

Phone: int - el número de teléfono en el que desea realizar una consulta de red. - Requerido.

Text: string – texto del mensaje sms

validity_period: int - Duración del SMS en minutos (min 1 minuto, max 4320)

sender: string - El remitente del mensaje, la longitud máxima es de 11 caracteres

part_count: int - cantidad de mensajes

concat_part: int - Número de partes del mensaje

status: string - posible estado de sms

Posibles valores de estado:

DELIVRD, UNDELIV, ACCEPTD, EXPIRED, REJECTD, ENROUTE, DELETED, UNKNOWN

Enviar ejemplos de SMS

<?php
$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://web.it-decision.com/v1/api/send-sms',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{"phone":380632132121,"sender":"InfoItd","text":"This is messages DecisionTelecom","validity_period":300}',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Basic api_key',
    'Content-Type: application/json',
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Informe de entrega de SMS

SMS Callbacks

You can create analytics on your SMS traffic by using event-based webhooks — user-defined HTTP callbacks — to track the delivery status of outgoing messages.

For every SMS message you send, IT-Decision Telecom sends a status update to a URL you configure as a callback. You can store the information on your server for delivery status analysis. Upon one of these events, IT-Decision Telecom makes an HTTP request (POST) to an endpoint URL you’ve configured for the webhook. To handle a webhook, you must create a listener (web app) that can accept these HTTP requests from IT-Decision Telecom. IT-Decision Telecom automatically retries webhooks three times if an HTTP 200 status code is not returned:

Interval - 15 minutes, 12 hours , 1 day, If your URL is not available for the whole retry period, the data will be lost (Delivery Reports).

http://client.com/callback
[
    {
        "message_id": "26381482",
        "time_delivery": "2022-05-27 12:31:25",
        "phone": "380632132122",
        "status": "2",
        "part_count": "1",
        "concat_part": "1"
    },
    {
        "message_id": "26381475",
        "time_delivery": "2022-05-27 07:17:44",
        "phone": "380631211121",
        "status": "2",
        "part_count": "1",
        "concat_part": "1"
    },
    {
        "message_id": "26381473",
        "time_delivery": "2022-05-27 07:04:15",
        "phone": "380631111111",
        "status": "2",
        "part_count": "1",
        "concat_part": "1"
    }
]

Possible values of status:

Params:

phone: - The telephone number that you want to do a network query on. - Required.

Time_delivery - SMS delivery time format DATETIME (utc + 0)

part_count: - amount of messages

concat_part: - Number of pieces of the message

status: - possible sms status

ENROUTE = 1;

DELIVERED = 2;

EXPIRED = 3;

DELETED = 4;

UNDELIVERABLE = 5;

ACCEPTED = 6;

UNKNOWN = 7;

REJECTED = 8;

Mensajería SMS Masiva

HTTP Authorization - Basic access key Base64

Enviar mensajes

https://web.it-decision.com/v1/api/multiple-message
{
	"phones": [380631111112, 380636151111],
	"sender": "info",
	"text": "when the text is more than 160 characters, the SMS is divided into several parts",
	"validity_period": 300
}

Response :

[
    [
        {
            "message_id": 26381268,
            "phone": 380631111112,
            "part_count": 2,
            "concat_part": 1,
            "status": "ACCEPTD"
        },
        {
            "message_id": 26381269,
            "phone": 380631111112,
            "part_count": 2,
            "concat_part": 2,
            "status": "ACCEPTD"
        }
    ],
    [
        {
            "message_id": 26381270,
            "phone": 380636151111,
            "part_count": 2,
            "concat_part": 1,
            "status": "ACCEPTD"
        },
        {
            "message_id": 26381271,
            "phone": 380636151111,
            "part_count": 2,
            "concat_part": 2,
            "status": "ACCEPTD"
        }
    ]
]

Params:

message_id int A unique random ID which is created on the DecisionTelecom platform.

Phones array The telephone number that you want to do a network query on.

sender string The sender of the message. This can be a mobile phone number (including a country code) or an alphanumeric string. The maximum length of alphanumeric strings is 11 characters.

text string Each multi-part text message is limited to 153 characters rather than 160 due to the need for user-data headers (UDHs) information.( 306 (2x153 characters) ,459 characters (3 x 153)…)

Mobile phones use UDH information to enable them to link long messages together so that they appear as single SMS messages in recipient’s phone inbox. Using Unicode, for languages such as Hindi, restricts your message to a maximum of 70 characters per SMS .

The maximum lengths of two-part and three-part multi-part Unicode text messages are 134 (2 x 67) and 201 (3 x 67) characters, respectively.

part_count int Count of parts

concat_part int Part number

validity_period int SMS lifetime min 2 minute max 4320

Ejemplos de mensajes SMS masivos

curl --location --request POST 'https://web.it-decision.com/v1/api/multiple-message' \
--header 'Authorization: api key base64' \
--header 'Content-Type: application/json' \
--data-raw '{"phones":[380631111112,380636151111],"sender":"info","text":"when the text is more than 160 characters, the SMS is divided into several parts","validity_period":300}'

Consulta de saldo

Method GET

HTTP Authorization - Basic access key Base64

Request: header ‘Authorization basic api key’

{
    "balance": "6123.9500000",
    "currency": "UAH",
    "credit": 0
}

Ejemplos Consulta de saldo

curl --location --request GET 'https://web.it-decision.com/v1/api/balance' \
--header 'Authorization: Basic api key' \

JAVA:
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
  .url("https://web.it-decision.com/v1/api/balance")
  .method("GET", body)
  .addHeader("Authorization", "Basic api key")
  
Response response = client.newCall(request).execute();

SMPP SMS API

Mensaje corto punto a punto (protocolo SMPP)

Se utiliza para enviar y recibir grandes volúmenes de tráfico de SMS. El protocolo SMPP es especialmente popular entre los proveedores de SMS y los operadores de telecomunicaciones.

Póngase en contacto con uno de nuestros asesores para obtener los datos para conectarse a través del protocolo SMPP.

Servidor SMPP

A continuación puede encontrar los datos para la conexión al servidor SMPP de DecisionTelecom:

nombre de host Puerto TLS Puerto

web.it-decision.com 2888 2999.

Nombre de usuario y contraseña

Su administrador de cuentas en DecisionTelecom le proporcionará un nombre de usuario (system_id) y una contraseña. Si aún no los ha recibido, o si todavía necesita hacer una solicitud, simplemente envíenos un correo electrónico a support@it-decision.com; Estaremos encantados de ayudarte.

Conectividad y ancho de banda

Siempre que se configure una cuenta SMPP para usted, obtendrá la cantidad requerida de conexiones (enlaces) y el rendimiento. En la mayoría de los casos, estos valores serán 1 enlace y 50 mensajes por segundo.

Es interesante señalar que estos valores pueden ser superiores a petición del cliente.

Seguridad

Si se conecta a cualquier servidor a través de una conexión TLS, asegúrese de seleccionar el puerto TCP 2999. También tenga en cuenta que los servidores solo aceptan métodos SSLv1, SSLv2 y SSLv3.

Bind PDU

La solicitud de PDU SMPP bind_receiver, bind_transceiver o bind_transmitter tiene un conjunto fijo de campos. La mayoría de los campos no nos importan; de hecho, solo leemos los campos system_id, password e interface_version e ignoramos el resto.

Versión_interfaz

El servidor SMPP de DecisionTelecom es compatible con el protocolo SMPP versión 3.4. Tenga en cuenta que si configura su cliente SMPP para la versión 3.3, se perderá algunas funciones, principalmente la información de TLV en las PDU de Deliver_sm.

Submit_sm PDU

Puede utilizar la PDU de submit_sm para enviarnos sus mensajes. La solicitud de PDU de submit_sm también tiene un par de campos que nuestra plataforma no utiliza y que se pueden ignorar de forma segura.

Data_coding

Los valores del campo de codificación de datos no se declaran explícitamente en la especificación SMPP, por lo que se requiere que cada servidor SMPP proporcione su propia definición. A continuación se muestra una lista de codificaciones de datos que aceptamos como entrada.

Last updated