# 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**

{% tabs %}
{% tab title="POST" %}

```
https://web.it-decision.com/v1/api/send-sms
```

```json
{
    "phone":380632132121,
    "sender":"InfoItd",
    "text":"This is messages DecisionTelecom",
    "validity_period":120
}
```

{% endtab %}
{% endtabs %}

#### Response:

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

## **Estado SMS**

{% tabs %}
{% tab title="GET" %}

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

{% endtab %}
{% endtabs %}

#### **Response:**

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

#### Parámetros:

**message\_id**: <mark style="color:red;">int</mark> - una identificación aleatoria única que se crea en la plataforma DecisionTelecom.

**Phone:** <mark style="color:red;">int</mark> - el número de teléfono en el que desea realizar una consulta de red. - Requerido.

**Text:** <mark style="color:red;">string</mark> – texto del mensaje sms

**validity\_period:** <mark style="color:red;">int</mark> - Duración del SMS en minutos (min 1 minuto, max 4320)

**sender:** <mark style="color:red;">string</mark> - El remitente del mensaje, la longitud máxima es de 11 caracteres

**part\_count:** <mark style="color:red;">int</mark> - cantidad de mensajes

**concat\_part:** <mark style="color:red;">int</mark> - Número de partes del mensaje

**status:** <mark style="color:red;">string</mark> - posible estado de sms&#x20;

#### **Posibles valores de estado:**

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

DELIVERED (DELIVRD) - El mensaje se ha entregado correctamente al usuario final.

EXPIRED (EXPIRED) - El mensaje no se entregó porque expiró el tiempo de entrega.

DELETED (DELETED) - El mensaje se ha eliminado y no se puede entregar.

UNDELIVERABLE (UNDELIV) - El mensaje no se puede entregar debido a un error permanente (por ejemplo, número incorrecto u otros problemas con el destinatario).

ACCEPTED (ACCEPTD) - El mensaje ha sido aceptado por el sistema del operador pero aún no se ha entregado.

UNKNOWN (UNKNOWN) - El estado del mensaje es desconocido, posiblemente debido a un problema temporal o una causa no identificada.

REJECTED (REJECTD) - El mensaje fue rechazado por el sistema y no se entregará (posiblemente debido a las políticas del operador u otras razones técnicas).

ENROUTE (ENROUTE) - El mensaje se ha reenviado a la red pero aún no se ha entregado al usuario final.

## **Enviar ejemplos de SMS**

{% tabs %}
{% tab title="PHP" %}

```
<?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;

```

{% endtab %}

{% tab title="GO" %}

```
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "web.it-decision.com/v1/api/send-sms"
  method := "POST"

  payload := strings.NewReader(`{"phone":380632132121,"sender":"InfoItd","text":"This is messages DecisionTelecom","validity_period":300}`)

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Authorization", "Basic api_key")
  req.Header.Add("Content-Type", "application/json")
  
  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
```

{% endtab %}

{% tab title="Java" %}

```
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"phone\":380632132121,\"sender\":\"InfoItd\",\"text\":\"This is messages DecisionTelecom\",\"validity_period\":300}");
Request request = new Request.Builder()
  .url("web.it-decision.com/v1/api/send-sms")
  .method("POST", body)
  .addHeader("Authorization", "Basic api_key")
  .addHeader("Content-Type", "application/json")
  .build();
Response response = client.newCall(request).execute();
```

{% endtab %}

{% tab title="С#" %}

```
var client = new RestClient("web.it-decision.com/v1/api/send-sms");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Basic api_key");
request.AddHeader("Content-Type", "application/json");
var body = @"{""phone"":380632132121,""sender"":""InfoItd"",""text"":""This is messages DecisionTelecom"",""validity_period"":300}";
request.AddParameter("application/json", body,  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
```

{% endtab %}

{% tab title="JavaScript" %}

```
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic api_key");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "phone": 380632132121,
  "sender": "InfoItd",
  "text": "This is messages DecisionTelecom",
  "validity_period": 300
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("web.it-decision.com/v1/api/send-sms", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
```

{% endtab %}

{% tab title="NODE" %}

```
var axios = require('axios');
var data = JSON.stringify({
  "phone": 380632132121,
  "sender": "InfoItd",
  "text": "This is messages DecisionTelecom",
  "validity_period": 300
});

var config = {
  method: 'post',
  url: 'web.it-decision.com/v1/api/send-sms',
  headers: { 
    'Authorization': 'Basic api_key', 
    'Content-Type': 'application/json'  
},
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
})
```

{% endtab %}

{% tab title="Python" %}

```
import http.client
import json

conn = http.client.HTTPSConnection("web.it-decision.com")
payload = json.dumps({
  "phone": 380632132121,
  "sender": "InfoItd",
  "text": "This is messages DecisionTelecom",
  "validity_period": 300
})
headers = {
  'Authorization': 'Basic api_key',
  'Content-Type': 'application/json'
}
conn.request("POST", "/v1/api/send-sms", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
```

{% endtab %}

{% tab title="RUBY" %}

```
require "uri"
require "json"
require "net/http"

url = URI("web.it-decision.com/v1/api/send-sms")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Basic api_key"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
  "phone": 380632132121,
  "sender": "InfoItd",
  "text": "This is messages DecisionTelecom",
  "validity_period": 300
})

response = http.request(request)
puts response.read_body
```

{% endtab %}
{% endtabs %}

## 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).

{% tabs %}
{% tab title="1. Send method Post client Url callback" %}

```
http://client.com/callback
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Json:" %}

```
[
    {
        "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"
    }
]

```

{% endtab %}
{% endtabs %}

#### 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\_par**t:  - 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

{% tabs %}
{% tab title="1. POST REQUEST json string" %}

```
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
}
```

{% endtab %}
{% endtabs %}

#### **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:

<mark style="color:red;">message\_id</mark> **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.

**sende**r 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. &#x20;

**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

{% tabs %}
{% tab title="CURL" %}

```
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}'

```

{% endtab %}

{% tab title="Golang" %}

```
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://web.it-decision.com/v1/api/multiple-message"
  method := "POST"

  payload := strings.NewReader(`{"phones":[380631111112,380636151111],"sender":"info","text":"when the text is more than 160 characters, the SMS is divided into several parts","validity_period":300}`)

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Authorization", "Basic api key base64")
  req.Header.Add("Content-Type", "application/json")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}

```

{% endtab %}

{% tab title=" C#" %}

```
var client = new RestClient("https://web.it-decision.com/v1/api/multiple-message");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Basic api key");
request.AddHeader("Content-Type", "application/json");
var body = @"{""phones"":[380631111112,380636151111],""sender"":""info"",""text"":""when the text is more than 160 characters, the SMS is divided into several parts"",""validity_period"":300}";
request.AddParameter("application/json", body,  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

```

{% endtab %}

{% tab title="JAVA" %}

```
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"phones\":[380631111112,380636151111],\"sender\":\"info\",\"text\":\"when the text is more than 160 characters, the SMS is divided into several parts\",\"validity_period\":300}");
Request request = new Request.Builder()
  .url("https://web.it-decision.com/v1/api/multiple-message")
  .method("POST", body)
  .addHeader("Authorization", "Basic api key")
  .addHeader("Content-Type", "application/json")
  .build();
Response response = client.newCall(request).execute();

```

{% endtab %}

{% tab title="JavaScript" %}

```
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic api key");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
  "phones": [
    380631111112,
    380636151111
  ],
  "sender": "info",
  "text": "when the text is more than 160 characters, the SMS is divided into several parts",
  "validity_period": 300
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://web.it-decision.com/v1/api/multiple-message", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

```

{% endtab %}

{% tab title="C lib CURL" %}

```
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
  curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
  curl_easy_setopt(curl, CURLOPT_URL, "https://web.it-decision.com/v1/api/multiple-message");
  curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
  curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
  struct curl_slist *headers = NULL;
  headers = curl_slist_append(headers, "Authorization: Basic api key");
  headers = curl_slist_append(headers, "Content-Type: application/json");
  const char *data = "{\"phones\":[380631111112,380636151111],\"sender\":\"info\",\"text\":\"when the text is more than 160 characters, the SMS is divided into several parts\",\"validity_period\":300}";
  curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data);
  res = curl_easy_perform(curl);
}
curl_easy_cleanup(curl);

```

{% endtab %}

{% tab title="NodJs" %}

```
var https = require('follow-redirects').https;
var fs = require('fs');

var options = {
  'method': 'POST',
  'hostname': 'web.it-decision.com',
  'path': '/v1/api/multiple-message',
  'headers': {
    'Authorization': 'Basic api key,
    'Content-Type': 'application/json'
  },
  'maxRedirects': 20
};

var req = https.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function (chunk) {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });

  res.on("error", function (error) {
    console.error(error);
  });
});

var postData = JSON.stringify({
  "phones": [
    380631111112,
    380636151111
  ],
  "sender": "info",
  "text": "when the text is more than 160 characters, the SMS is divided into several parts",
  "validity_period": 300
});

req.write(postData);

req.end();

```

{% endtab %}

{% tab title="PHP" %}

```
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://web.it-decision.com/v1/api/multiple-message',
  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 =>'{"phones":[380631111112,380636151111],"sender":"info","text":"when the text is more than 160 characters, the SMS is divided into several parts","validity_period":300}',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Basic api key',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

{% endtab %}

{% tab title="Python" %}

```
import http.client
import json

conn = http.client.HTTPSConnection("web.it-decision.com")
payload = json.dumps({
  "phones": [
    380631111112,
    380636151111
  ],
  "sender": "info",
  "text": "when the text is more than 160 characters, the SMS is divided into several parts",
  "validity_period": 300
})
headers = {
  'Authorization': 'Basic api key',
  'Content-Type': 'application/json',
 
}
conn.request("POST", "/v1/api/multiple-message", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))


```

{% endtab %}
{% endtabs %}

## Consulta de saldo

#### Method GET

HTTP Authorization - Basic access key Base64

#### Request: header ‘Authorization basic api key’

{% tabs %}
{% tab title="Response json:" %}

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

```

{% endtab %}
{% endtabs %}

## Ejemplos Consulta de saldo

{% tabs %}
{% tab title="CURL" %}

```
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();

```

{% endtab %}

{% tab title="JavaScript" %}

```
var myHeaders = new Headers();
myHeaders.append("Authorization", "Basic api key");
var urlencoded = new URLSearchParams();

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  body: urlencoded,
  redirect: 'follow'
};

fetch("https://web.it-decision.com/v1/api/balance", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

C lib curl

CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
  curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "GET");
  curl_easy_setopt(curl, CURLOPT_URL, "https://web.it-decision.com/v1/api/balance");
  curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
  curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
  struct curl_slist *headers = NULL;
  headers = curl_slist_append(headers, "Authorization: Basic api key");

  curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
  const char *data = "";
  curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data);
  res = curl_easy_perform(curl);
}
curl_easy_cleanup(curl);

```

{% endtab %}

{% tab title="NodeJS" %}

```
var https = require('follow-redirects').https;
var fs = require('fs');

var qs = require('querystring');

var options = {
  'method': 'GET',
  'hostname': 'web.it-decision.com',
  'path': '/v1/api/balance',
  'headers': {
    'Authorization': 'Basic api key'
  },
  'maxRedirects': 20
};

var req = https.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function (chunk) {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });

  res.on("error", function (error) {
    console.error(error);
  });
});

var postData = qs.stringify({

});

req.write(postData);

req.end();

```

{% endtab %}

{% tab title="PHP" %}

```
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://web.it-decision.com/v1/api/balance',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Basic api key'
    ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

{% endtab %}

{% tab title="C#" %}

```
var client = new RestClient("https://web.it-decision.com/v1/api/balance");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Basic api key");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

```

{% endtab %}

{% tab title="Python" %}

```
import http.client

conn = http.client.HTTPSConnection("web.it-decision.com")
payload = ''
headers = {
  'Authorization': 'Basic api key'
}
conn.request("GET", "/v1/api/balance", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))

```

{% endtab %}
{% endtabs %}

## **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**&#x20;

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&#x20;

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.

| Value | Encoding                                      |
| ----- | --------------------------------------------- |
| 0     | GSM7                                          |
| 1     | ASCII                                         |
| 2     | 8BIT                                          |
| 3     | ISO-8859-15 West European languages (Latin-9) |
| 6     | ISO-8859-5 Latin/Cyrillic                     |
| 7     | ISO-8859-8 Latin/Hebrew                       |
| 8     | UTF-16BE (UCS2)                               |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://es-api.decisiontele.com/sms-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
