Use the SMPP Client for convert HTTP to SMPP

1. Create an API-key

To start using the HTTP API, create your own API key in your account.

2. Add SMSC

Add SMS-provider(s) (SMSC) so that our SMPP client can establish a connection.

3. Send SMS

Send an SMS via HTTP, and our SMPP-Converter will forward it to the SMSC by «smsc_id».

4. Retrieve the status of SMS

Get real-time status updates on your «Webhook URL».

Create API key

Creation of an API Key

To perform all HTTP requests to our API, mandatory authorization using an API key in the headers is required. Access levels can be configured for each key.

In the user's account section under «API Keys» generate Your API-key using the form:
IP Whitelist - this is an optional parameter, but we recommend filling it out if you know the IP addresses from which you will be calling our endpoints;
Can Send SMS - enabling this allows sending SMS via SMPP Client;
Can Fetch SMS Out - allows retrieving the history of all sent SMS;
Can Manage SMSC - grants full control (CRUD) over SMS providers;
Can Fetch SMSC-Logs - allows searching and exporting of SMPP Client logs.
Can Send DLR - enabling this allows sending DLR (status of SMS) via SMPP Server;
Can Fetch SMS In - allows retrieving the history of all received SMS by ESMEs;
Can Manage ESME - grants full control (CRUD) over SMPP profiles;
Can Fetch ESME-Logs - allows searching and exporting of SMPP Server logs.

      
                        
    import requests
    
    response = requests.post('https://smpp-converter.com/api/gateway/create/',
        headers={
            'X-API-Key': 'Your API-key'
        },
        json={
            'smsc_id': 'mysmsc-id-example',
            'host': 'smpp.mygateway.com',
            'port': 2775,
            'username': 'myusername',
            'password': 'mypassw',
            'enq_interval': 30,
            'src_autodetect': True,
            'dst_autodetect': True,
            'tx_binds': 0,
            'rx_binds': 0,
            'trx_binds': 1,
            'smpp_version': '3.4',
            'webhook': 'https://myapp.com/sent-sms-status/',
            'is_gsm7': True,
            'is_secure': False,
            'enabled': True,
        })
    
    print(response.json())
                        
                    
      
                            
    $ch = curl_init('https://smpp-converter.com/api/gateway/create/');
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_HTTPHEADER, [
        'Content-Type: application/json',
        'X-API-Key: Your API-key'
    ]);
    curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
        'smsc_id' => 'mysmsc-id-example',
        'host' => 'smpp.mygateway.com',
        'port' => 2775,
        'username' => 'myusername',
        'password' => 'mypassw',
        'enq_interval' => 30,
        'src_autodetect' => true,
        'dst_autodetect' => true,
        'tx_binds' => 0,
        'rx_binds' => 0,
        'trx_binds' => 1,
        'smpp_version' => '3.4',
        'webhook' => 'https://myapp.com/sent-sms-status/',
        'is_gsm7' => true,
        'is_secure' => false,
        'enabled' => true,
    ]));
    
    $response = curl_exec($ch);
    curl_close($ch);
    
    echo $response;
                            
                        
      
                            
    fetch('https://smpp-converter.com/api/gateway/create/', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
            'X-API-Key': 'Your API-key'
        },
        body: JSON.stringify({
            smsc_id: 'mysmsc-id-example',
            host: 'smpp.mygateway.com',
            port: 2775,
            username: 'myusername',
            password: 'mypassw',
            enq_interval: 30,
            src_autodetect: true,
            dst_autodetect: true,
            tx_binds: 0,
            rx_binds: 0,
            trx_binds: 1,
            smpp_version: '3.4',
            webhook: 'https://myapp.com/sent-sms-status/',
            is_gsm7: true,
            is_secure: false,
            enabled: true
        })
    })
    .then(response => response.json())
    .then(data => console.log(data))
    .catch(error => console.error('Error:', error));
                            
                        
                            
    package main
    
    import (
    	"bytes"
    	"encoding/json"
    	"fmt"
    	"net/http"
    )
    
    func main() {
    	url := "https://smpp-converter.com/api/gateway/create/"
    	payload := map[string]interface{}{
    		"smsc_id":        "mysmsc-id-example",
    		"host":           "smpp.mygateway.com",
    		"port":           2775,
    		"username":       "myusername",
    		"password":       "mypassw",
    		"enq_interval":   30,
    		"src_autodetect": true,
    		"dst_autodetect": true,
    		"tx_binds":       0,
    		"rx_binds":       0,
    		"trx_binds":      1,
    		"smpp_version":   "3.4",
            "webhook":        "https://myapp.com/sent-sms-status/",
    		"is_gsm7":        true,
    		"is_secure":      false,
    		"enabled":        true,
    	}
    
    	jsonData, err := json.Marshal(payload)
    	if err != nil {
    		fmt.Println("Error marshaling JSON:", err)
    		return
    	}
    
    	req, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
    	if err != nil {
    		fmt.Println("Error creating request:", err)
    		return
    	}
    
    	req.Header.Set("Content-Type", "application/json")
    	req.Header.Set("X-API-Key", "Your API-key")
    
    	client := &http.Client{}
    	resp, err := client.Do(req)
    	if err != nil {
    		fmt.Println("Error making request:", err)
    		return
    	}
    	defer resp.Body.Close()
    
    	var result map[string]interface{}
    	json.NewDecoder(resp.Body).Decode(&result)
    	fmt.Println(result)
    }
                            
                        
                            
    import java.net.URI;
    import java.net.http.HttpClient;
    import java.net.http.HttpRequest;
    import java.net.http.HttpResponse;
    import com.google.gson.JsonObject;
    import com.google.gson.JsonParser;
    
    public class Main {
        public static void main(String[] args) throws Exception {
            HttpClient client = HttpClient.newHttpClient();
    
            JsonObject json = new JsonObject();
            json.addProperty("smsc_id", "mysmsc-id-example");
            json.addProperty("host", "smpp.mygateway.com");
            json.addProperty("port", 2775);
            json.addProperty("username", "myusername");
            json.addProperty("password", "mypassw");
            json.addProperty("enq_interval", 30);
            json.addProperty("src_autodetect", true);
            json.addProperty("dst_autodetect", true);
            json.addProperty("tx_binds", 0);
            json.addProperty("rx_binds", 0);
            json.addProperty("trx_binds", 1);
            json.addProperty("smpp_version", "3.4");
            json.addProperty("webhook", "https://myapp.com/sent-sms-status/");
            json.addProperty("is_gsm7", true);
            json.addProperty("is_secure", false);
            json.addProperty("enabled", true);
    
            HttpRequest request = HttpRequest.newBuilder()
                    .uri(URI.create("https://smpp-converter.com/api/gateway/create/"))
                    .header("Content-Type", "application/json")
                    .header("X-API-Key", "Your API-key")
                    .POST(HttpRequest.BodyPublishers.ofString(json.toString()))
                    .build();
    
            HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
            System.out.println(response.body());
        }
    }
                            
                        
    HTTP Response (Status 200):
                    
    OK
                    
                    
    HTTP Response (Status 400):
                    
    {
    "smsc_id":[
        "This field is required."
    ],
    "host":[
        "This field is required."
    ],
    "port":[
        "This field is required."
    ],
    ...
    }
                    
                    
    HTTP Response (Status 403):
                    
    Insufficient api_key.permissions to perform this operation.
                    
                    

    Adding and editing SMSCs

    You can add an SMS-gateway (SMSC) through the web form in your account. However, if you need to manage the CRUD process for SMSCs from your application, use the HTTP API.
    To add an SMS provider, perform a POST request to endpoint https://smpp-converter.com/api/gateway/create/ with the following JSON parameters:

    smsc_id - required, string, max. 100 characters. A unique string ID for the SMS provider. Example: «infobip-direct»;
    host - required, string, max. 100 characters. IP address or domain of the SMSC for SMPP connection;
    port - required, number, max. 65536. Port for SMPP connection;
    username - required, string, max. 16 characters. Username for connecting to the SMSC;
    password - optional, string, max. 9 characters. Password for connecting to the SMSC;
    system_type - optional, string, max. 13 characters. System type used in some SMSCs for classifying the type of binding;
    enq_interval - required, number, max. 120. Interval for sending the enquire_link command, recommended value is 30;
    src_autodetect - required, boolean value. Indicates to the SMPP client that source_addr_ton and source_addr_npi should be determined automatically;
    source_ton - optional, number, max. 6. If src_autodetect is turned off, this value will be used for source_addr_ton for all SMS;
    source_npi - optional, number, max. 18. If src_autodetect is turned off, this value will be used for source_addr_npi for all SMS;
    dst_autodetect - required, boolean value. Indicates to the SMPP client that dest_addr_ton and dest_addr_npi should be determined automatically;
    dest_ton - optional, number, max. 6. If dst_autodetect is turned off, this value will be used for dest_addr_ton for all SMS;
    dest_npi - optional, number, max. 18. If dst_autodetect is turned off, this value will be used for dest_addr_npi for all SMS;
    tx_binds - required, number, max. 10. Indicates to the SMPP client how many concurrent connections (binds) to open in Transmitter mode (for sending submit_sm only);
    rx_binds - required, number, max. 10. Indicates to the SMPP client how many concurrent connections (binds) to open in Receiver mode (for receiving deliver_sm only);
    trx_binds - required, number, max. 10. Indicates to the SMPP client how many concurrent connections (binds) to open in Transceiver mode (for sending submit_sm and receiving deliver_sm);
    smpp_version - required, string, max. 3 characters. The version of the SMPP protocol supported by the SMSC. Can be «3.3», «3,4», «5.0»;
    webhook - optional, string, max. 255 characters. The «Webhook URL» will be called via HTTP each time a status is received for an SMS sent through this SMSC;
    is_gsm7 - required, boolean value. Indicates to the SMPP client that the SMSC supports 7-bit encoding and a maximum SMS length of 160 characters instead of 140;
    is_secure - required, boolean value. Indicates to the SMPP client that the connection to the SMSC should be made using a secure SSL/TLS protocol;
    enabled - required, boolean value. Active or inactive connection. When deactivated, an «unbind» command will be sent immediately to the SMSC, and the connection will be closed.

    To edit an SMS provider, perform a PUT request to the endpoint https://smpp-converter.com/api/gateway/update/ with JSON parameters similar to those used for creation. When editing, the SMPP client will automatically perform a secure reconnection with the new parameters.

                                  
      import requests
      
      resp = requests.get('https://smpp-converter.com/api/gateway/list/', 
          headers={
              'X-API-Key': 'Your API-key',
          })
      print(resp.json())
                                  
                              
        
                                  
      $ch = curl_init('https://smpp-converter.com/api/gateway/list/');
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($ch, CURLOPT_HTTPHEADER, ['X-API-Key: Your API-key']);
      $response = curl_exec($ch);
      curl_close($ch);
      
      echo $response;
                                  
                              
        
                                  
      fetch('https://smpp-converter.com/api/gateway/list/', {
          headers: {
              'X-API-Key': 'Your API-key'
          }
      })
      .then(response => response.json())
      .then(data => console.log(data))
      .catch(error => console.error('Error:', error));
                                  
                              
                                  
      package main
      
      import (
          "fmt"
          "io/ioutil"
          "net/http"
      )
      
      func main() {
          req, _ := http.NewRequest("GET", "https://smpp-converter.com/api/gateway/list/", nil)
          req.Header.Set("X-API-Key", "Your API-key")
      
          client := &http.Client{}
          resp, _ := client.Do(req)
          defer resp.Body.Close()
      
          body, _ := ioutil.ReadAll(resp.Body)
          fmt.Println(string(body))
      }
                                  
                              
                                  
      import java.net.URI;
      import java.net.http.HttpClient;
      import java.net.http.HttpRequest;
      import java.net.http.HttpResponse;
      
      public class Main {
          public static void main(String[] args) throws Exception {
              HttpClient client = HttpClient.newHttpClient();
              HttpRequest request = HttpRequest.newBuilder()
                      .uri(URI.create("https://smpp-converter.com/api/gateway/list/"))
                      .header("X-API-Key", "Your API-key")
                      .build();
      
              HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
              System.out.println(response.body());
          }
      }
                                  
                              
      HTTP Response (Status 200):
                              
      {
          "gateways": [
              {
                  "id": 1234,
                  "smsc_id": "mysmsc-id-example",
                  "host": "smpp.mygateway.com",
                  "port": 2775,
                  "username": "myusername",
                  "system_type": "",
                  "enq_interval": 30,
                  "src_autodetect": true,
                  "source_ton": 5,
                  "source_npi": 0,
                  "dst_autodetect": true,
                  "dest_ton": 1,
                  "dest_npi": 1,
                  "tx_binds": 3,
                  "rx_binds": 3,
                  "trx_binds": 3,
                  "window_size": 1,
                  "smpp_version": "3.4",
                  "webhook": "https://myapp.com/sent-sms-status/",
                  "is_gsm7": true,
                  "is_secure": false,
                  "enabled": true,
                  "updated": 1721751278,
                  "created": 1721748953,
                  "queue_count": 0
              },
          ...
          ],
          "connections": {
              "BIND_TX": [
                  {
                      "gateway_id": 1234,
                      "bindType": "BIND_TX",
                      "status": "BOUND_TX",
                      "connectionId": "06631ea8-ca27-4b30-a66d-53c888f8a0ea",
                      "localAddr": "192.168.1.2:53992",
                      "remoteAddr": "12.34.56.78:2775",
                      "inflightCount": 0,
                      "queueCount": 0,
                      "connected": 1721935169
                  },
              ...
              ],
              "BIND_RX": [
                  {
                      "gateway_id": 1234,
                      "bindType": "BIND_RX",
                      "status": "BOUND_RX",
                      "connectionId": "289556f0-2ba8-410b-84ba-7bfc1ed20ed6",
                      "localAddr": "192.168.1.2:53989",
                      "remoteAddr": "12.34.56.78:2775",
                      "inflightCount": 0,
                      "queueCount": 0,
                      "connected": 1721935169
                  },
                  ...
              ],
              "BIND_TRX": [
                  {
                      "gateway_id": 1234,
                      "bindType": "BIND_TRX",
                      "status": "BOUND_TRX",
                      "connectionId": "d41d1f18-f22d-4a29-9403-f064871ad8c0",
                      "localAddr": "192.168.1.2:54128",
                      "remoteAddr": "12.34.56.78:29900",
                      "inflightCount": 0,
                      "queueCount": 0,
                      "connected": 1721935159
                  },
              ...
              ]
          }
      }
                              
                          
      HTTP Response (Status 403):
                              
      Insufficient api_key.permissions to perform this operation.
                              
                          

      Retrieving the list of SMSCs

      You can view the list and connection statuses of SMS providers in your account under the «SMSC List» tab. However, if you need to display the list in your application, use the HTTP API. To retrieve the list of SMS providers, make a GET request to the endpoint https://smpp-converter.com/api/gateway/list/

      The response will contain a two-dimensional array:
      gateways - a list of SMS providers;
      connections - active connections (binds).

      The list of «gateways»:
      id - unique numerical ID of the provider in the our database;
      smsc_id - unique string ID of the SMS provider;
      host - IP address or domain for SMPP connection to the SMSC;
      port - port for SMPP connection to the SMSC;
      username - username for connecting to the SMSC;
      system_type - system type for classifying the type of bind to the SMSC;
      enq_interval - interval for sending the «enquire_link» (ping) command;
      src_autodetect - whether auto-detection of «source_addr_ton» and «source_addr_npi» is enabled or disabled;
      source_ton - «source_addr_ton» by default if «src_autodetect» is disabled;
      source_npi - «source_addr_npi» by default if «src_autodetect» is disabled;
      dst_autodetect - whether auto-detection of «dest_addr_ton» and «dest_addr_npi» is enabled or disabled;
      dest_ton - «dest_addr_ton» by default if «dst_autodetect» is disabled;
      dest_npi - «dest_addr_npi» by default if «dst_autodetect» is disabled;
      tx_binds - the number of simultaneous connections as «Transmitter»;
      rx_binds - the number of simultaneous connections as «Receiver»;
      trx_binds - the number of simultaneous connections as «Transceiver»;
      window_size - the window for transmitting PDU packets. By default, it is 1, which helps minimize losses in case of connection interruptions;
      smpp_version - version of the SMPP protocol;
      webhook - The «Webhook URL» for receive status of sent SMS through this SMSC;
      is_gsm7 - does the SMSC support 7-bit GSM7 encoding (increases SMS length to 160 characters);
      is_secure - is the SSL/TLS protocol used;
      enabled - whether the connection to the SMSC is enabled or disabled;
      updated - Unix Timestamp of the last change to the SMS provider's parameters;
      created - Unix Timestamp of the SMS provider's addition;
      queue_count - the number of SMS messages in the queue. This may occur if the SMSC is unavailable or has very low throughput. If the value is high, it is recommended to increase the number of connections in Transmitter or Transceiver mode, provided that the SMSC has not set its own sending rate limit.

      The list of «connections» can be of 3 types: BIND_TX - SMS sending only mode, BIND_RX - receiving delivery reports (DLR) mode or BIND_TRX - sending SMS and receiving DLR:
      gateway_id - numeric ID of the SMS provider in the our database;
      bindType - connection mode to the SMSC. It can be «BIND_TX» - Transmitter, «BIND_RX» - Receiver, or «BIND_TRX» - Transceiver;
      status - connection status (bind status). It can be «DIAL» - establishing connection, «OPEN» - authorization, «BOUND_TX» - connected as Transmitter, «BOUND_RX» - connected as Receiver, «BOUND_TRX» - connected as Transceiver, «UNBINDING» - disconnecting, or «CLOSED» - connection closed. If the SMS provider is enabled, a reconnection attempt will be made;
      connectionId - unique string ID of the connection;
      localAddr - connection address on the SMPP client side;
      remoteAddr - connection address on the SMSC side;
      inflightCount - number of SMS messages in the process of being sent;
      queueCount - SMS queue waiting for sending. This may occur if the connection is interrupted or if the SMSC limits throughput;
      connected - Unix Timestamp of the last status change of the connection.

          
                            
        import requests
        
        resp = requests.delete('https://smpp-converter.com/api/gateway/delete/1234/', 
            headers={
                'X-API-Key': 'Your API-key',
            })
        print(resp.json())
                            
                        
          
                                
        $ch = curl_init('https://smpp-converter.com/api/gateway/delete/1234/');
        curl_setopt_array($ch, [
            CURLOPT_RETURNTRANSFER => true,
            CURLOPT_CUSTOMREQUEST => 'DELETE',
            CURLOPT_HTTPHEADER => ['X-API-Key: Your API-key']
        ]);
        $response = curl_exec($ch);
        curl_close($ch);
        
        echo $response;                
                                
                            
          
                                
        fetch('https://smpp-converter.com/api/gateway/delete/1234/', {
            method: 'DELETE',
            headers: {
                'X-API-Key': 'Your API-key'
            }
        })
        .then(response => response.json())
        .then(data => console.log(data))
        .catch(error => console.error('Error:', error));
                                
                            
                                
        package main
        
        import (
            "fmt"
            "net/http"
            "io/ioutil"
        )
        
        func main() {
            req, _ := http.NewRequest("DELETE", "https://smpp-converter.com/api/gateway/delete/1234/", nil)
            req.Header.Set("X-API-Key", "Your API-key")
        
            resp, _ := http.DefaultClient.Do(req)
            defer resp.Body.Close()
        
            body, _ := ioutil.ReadAll(resp.Body)
            fmt.Println(string(body))
        }
                                
                            
                                
        import java.net.URI;
        import java.net.http.HttpClient;
        import java.net.http.HttpRequest;
        import java.net.http.HttpResponse;
        
        public class Main {
            public static void main(String[] args) throws Exception {
                HttpClient client = HttpClient.newHttpClient();
                HttpRequest request = HttpRequest.newBuilder()
                        .uri(URI.create("https://smpp-converter.com/api/gateway/delete/1234/"))
                        .header("X-API-Key", "Your API-key")
                        .DELETE()
                        .build();
        
                HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
                System.out.println(response.body());
            }
        }
                                
                            
        HTTP Response (Status 200):
                            
        OK
                            
                        
        HTTP Response (Status 403):
                            
        Insufficient api_key.permissions to perform this operation.
                            
                        

        Deleting an SMS provider

        You can delete an SMS provider from your account. However, if you need to control the CRUD process for the SMSC from your application, use the HTTP API.
        To delete an SMSC, make a DELETE request to the endpoint https://smpp-converter.com/api/gateway/delete/XXX/ - where XXX is the numeric ID of the SMS provider.
        If the SMS provider is enabled and a connection is established at the time of deletion, the SMPP client will immediately send an «unbind» command and close the connection.

            
                              
          import requests
          
          resp = requests.post('https://smpp-converter.com/api/message/smsc/create/', 
              headers={
                  'X-API-Key': 'Your API-key',
              },
              json=[{
                  'smsc_id': 'mysmsc-id-example',
                  'msg_id': '074b8a96-f983-4b0b-8079-4d4c8502ff02',
                  'sender': 'MySender',
                  'receiver': '380991234567',
                  'message': 'Have a nice day!',
                  },
                  {
                  'smsc_id': 'mysmsc-id-example',
                  'msg_id': 'f4b75969-ce6e-40d7-938b-a17444509b32',
                  'sender': 'MySender',
                  'receiver': '380677654321',
                  'message': 'Have a nice day!',
                  },
              ])
          print(resp.json())
                              
                          
            
                                  
          $ch = curl_init('https://smpp-converter.com/api/message/smsc/create/');
          curl_setopt_array($ch, [
          CURLOPT_RETURNTRANSFER => true,
          CURLOPT_POST => true,
          CURLOPT_POSTFIELDS => json_encode([
          [
              'smsc_id' => 'mysmsc-id-example',
              'msg_id' => '074b8a96-f983-4b0b-8079-4d4c8502ff02',
              'sender' => 'MySender',
              'receiver' => '380991234567',
              'message' => 'Have a nice day!',
          ],
          [
              'smsc_id' => 'mysmsc-id-example',
              'msg_id' => 'f4b75969-ce6e-40d7-938b-a17444509b32',
              'sender' => 'MySender',
              'receiver' => '380677654321',
              'message' => 'Have a nice day!',
          ]
          ]),
          CURLOPT_HTTPHEADER => [
              'X-API-Key: Your API-key',
              'Content-Type: application/json'
          ]
          ]);
          
          $response = curl_exec($ch);
          curl_close($ch);
          
          echo $response;
                                  
                              
            
                                  
          fetch('https://smpp-converter.com/api/message/smsc/create/', {
              method: 'POST',
              headers: {
                  'X-API-Key': 'Your API-key',
                  'Content-Type': 'application/json'
              },
              body: JSON.stringify([
                  {
                      smsc_id: 'mysmsc-id-example',
                      msg_id: '074b8a96-f983-4b0b-8079-4d4c8502ff02',
                      sender: 'MySender',
                      receiver: '380991234567',
                      message: 'Have a nica day!',
                  },
                  {
                      smsc_id: 'mysmsc-id-example',
                      msg_id: 'f4b75969-ce6e-40d7-938b-a17444509b32',
                      sender: 'MySender',
                      receiver: '380677654321',
                      message: 'Have a nica day!',
                  }
              ])
          })
          .then(response => response.json())
          .then(data => console.log(data))
          .catch(error => console.error('Error:', error));
                                  
                              
                                  
          package main
          
          import (
              "bytes"
              "encoding/json"
              "fmt"
              "net/http"
          )
          
          func main() {
              data := []map[string]interface{}{
                  {
                      "smsc_id":  "mysmsc-id-example",
                      "msg_id":   "074b8a96-f983-4b0b-8079-4d4c8502ff02",
                      "sender":   "MySender",
                      "receiver": "380991234567",
                      "message":  "Have a nica day!",
                  },
                  {
                      "smsc_id":  "mysmsc-id-example",
                      "msg_id":   "f4b75969-ce6e-40d7-938b-a17444509b32",
                      "sender":   "MySender",
                      "receiver": "380677654321",
                      "message":  "Have a nica day!",
                  },
              }
          
              jsonData, _ := json.Marshal(data)
          
              req, _ := http.NewRequest("POST", "https://smpp-converter.com/api/message/smsc/create/", bytes.NewBuffer(jsonData))
              req.Header.Set("X-API-Key", "Your API-key")
              req.Header.Set("Content-Type", "application/json")
          
              client := &http.Client{}
              resp, _ := client.Do(req)
              defer resp.Body.Close()
          
              body, _ := io.ReadAll(resp.Body)
              fmt.Println(string(body))
          }
                                  
                              
                                  
          import java.net.URI;
          import java.net.http.HttpClient;
          import java.net.http.HttpRequest;
          import java.net.http.HttpResponse;
          import java.util.List;
          import com.fasterxml.jackson.databind.ObjectMapper;
          
          public class Main {
              public static void main(String[] args) throws Exception {
                  HttpClient client = HttpClient.newHttpClient();
                  ObjectMapper mapper = new ObjectMapper();
          
                  String json = mapper.writeValueAsString(List.of(
                      Map.of(
                          "smsc_id", "mysmsc-id-example",
                          "msg_id", "074b8a96-f983-4b0b-8079-4d4c8502ff02",
                          "sender", "MySender",
                          "receiver", "380991234567",
                          "message", "Have a nica day!"
                      ),
                      Map.of(
                          "smsc_id", "mysmsc-id-example",
                          "msg_id", "f4b75969-ce6e-40d7-938b-a17444509b32",
                          "sender", "MySender",
                          "receiver", "380677654321",
                          "message", "Have a nica day!"
                      )
                  ));
          
                  HttpRequest request = HttpRequest.newBuilder()
                          .uri(URI.create("https://smpp-converter.com/api/message/smsc/create/"))
                          .header("X-API-Key", "Your API-key")
                          .header("Content-Type", "application/json")
                          .POST(HttpRequest.BodyPublishers.ofString(json))
                          .build();
          
                  HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
                  System.out.println(response.body());
              }
          }
                                  
                              
          HTTP Response (Status 200):
                          
          OK
                          
                          
          HTTP Response (Status 400):
                              
          {
          "smsc_id":[
              "This field is required."
          ],
          "msg_id":[
              "This field is required.",
              "Duplicate the message id."
          ],
          "sender":[
              "This field is required."
          ],
          ...
          }
                              
                          
          HTTP Response (Status 403):
                              
          Insufficient balance.
                              
                              
          Insufficient api_key.permissions to perform this operation.
                              
                          

          Sending SMS

          To send an SMS, make a POST request to the endpoint https://smpp-converter.com/api/message/smsc/create/ with the following JSON parameters:

          smsc_id - (required, string, max. 100 characters) unique string ID of the SMS provider through which the SMS should be sent;
          msg_id - (required, string, max. 255 characters) is a unique string identifier for the SMS in your application. You send it to us when sending the message, and then use it to track statuses when receiving a POST request to the webhook. More details in the section «Receiving SMS statuses»;
          sender - (required, string, max. 25 characters) sender name for the SMS;
          receiver - (required, string, max. 15 characters) recipient's phone number in international format, numeric only;
          message - (required, string, max. 1000 characters) text of the SMS message. If the text exceeds 140 bytes (160 characters for 7-bit encoding, 140 for 8-bit encoding, or 70 for 16-bit encoding), the SMS will be split into segments of 134 bytes (153 characters for 7-bit encoding, 134 for 8-bit encoding, or 67 for 16-bit encoding). Note that for 7-bit encoding (GSM7), characters «^{}\[~]|€» are counted as two characters.

          Up to 1000 SMS messages can be sent in a single HTTP request. Status updates will be sent to the user's webhook in separate requests for each segment.

              
                                
            import json
            
            request_body = '{"smsc_id": "mysmsc-id-example", "msg_id": "074b8a96-f983-4b0b-8079-4d4c8502ff02", "status": "sent", ...}'
            
            data = json.loads(request_body)
            
            print(data)
            # {'smsc_id': 'mysmsc-id-example', 'msg_id': '074b8a96-f983-4b0b-8079-4d4c8502ff02', 'status': 'sent', ...}
                                
                            
              
                                    
            $request_body = '{"smsc_id": "mysmsc-id-example", "msg_id": "074b8a96-f983-4b0b-8079-4d4c8502ff02", "status": "sent", ...}';
            
            $data = json_decode($request_body, true);
            
            print_r($data);
            // Array ( [smsc_id] => mysmsc-id-example [msg_id] => 074b8a96-f983-4b0b-8079-4d4c8502ff02 [status] => sent, ... )                            
                                    
                                
              
                                    
            const requestBody = '{"smsc_id": "mysmsc-id-example", "msg_id": "074b8a96-f983-4b0b-8079-4d4c8502ff02", "status": "sent", ...}';
            
            const data = JSON.parse(requestBody);
            
            console.log(data);
            // { smsc_id: 'mysmsc-id-example', msg_id: '074b8a96-f983-4b0b-8079-4d4c8502ff02', status: 'sent', ... }
                                    
                                
                                    
            package main
            
            import (
                "encoding/json"
                "fmt"
            )
            
            func main() {
                requestBody := `{"smsc_id": "mysmsc-id-example", "msg_id": "074b8a96-f983-4b0b-8079-4d4c8502ff02", "status": "sent", ...}`
            
                var data map[string]interface{}
                err := json.Unmarshal([]byte(requestBody), &data)
                if err != nil {
                    fmt.Println("Error:", err)
                    return
                }
            
                fmt.Println(data)
                // map[smsc_id:mysmsc-id-example msg_id:074b8a96-f983-4b0b-8079-4d4c8502ff02 status:sent, ...]
            }
                                    
                                
                                    
            import com.fasterxml.jackson.databind.ObjectMapper;
            import java.io.IOException;
            import java.util.Map;
            
            public class JsonExample {
                public static void main(String[] args) {
                    String requestBody = "{\"smsc_id\": \"mysmsc-id-example\", \"msg_id\": \"074b8a96-f983-4b0b-8079-4d4c8502ff02\", \"status\": \"sent\", ...}";
            
                    ObjectMapper mapper = new ObjectMapper();
                    try {
                        Map data = mapper.readValue(requestBody, Map.class);
                        System.out.println(data);
                        // {smsc_id=mysmsc-id-example, msg_id=074b8a96-f983-4b0b-8079-4d4c8502ff02, status=sent, ...}
                    } catch (IOException e) {
                        e.printStackTrace();
                    }
                }
            }
                                    
                                
            HTTP Request (Status «accepted»):
                                
            {
                "smsc_id":"mysmsc-id-example",
                "msg_id":"074b8a96-f983-4b0b-8079-4d4c8502ff02",
                "total_parts":1,
                "part_number":1,
                "data_coding":0,
                "status":"accepted",
                "acpt_time":1721980552913
            }
                                    
                            
            HTTP Request (Status «sent»):
                                
            {
                "smsc_id":"mysmsc-id-example",
                "msg_id":"074b8a96-f983-4b0b-8079-4d4c8502ff02",
                "gateway_msg_id":"655a1b96a6c90b528d62397caec3c15d5d7dddccacaf9aae6feed22c0b9f9b15",
                "total_parts":1,
                "part_number":1,
                "data_coding":0,
                "status":"sent",
                "acpt_time":1721980552913,
                "sent_time":1721980552933,
                "smsc_time":1721980552953
            }
                                
                            
            HTTP Request (Final status «delivered/undelivered/rejected/expired/unknown»):
                                
            {
                "smsc_id":"mysmsc-id-example",
                "msg_id":"074b8a96-f983-4b0b-8079-4d4c8502ff02",
                "gateway_msg_id":"655a1b96a6c90b528d62397caec3c15d5d7dddccacaf9aae6feed22c0b9f9b15",
                "total_parts":1,
                "part_number":1,
                "data_coding":0,
                "status":"delivered",
                "acpt_time":1721980552913,
                "sent_time":1721980552933,
                "smsc_time":1721980552953,
                "dlr_time":1721980562327
            }
                                
                            

            Receiving Status of sent SMS

            To receive SMS statuses, specify the «Webhook URL» when creating or editing the SMSC. The status of each SMS/segment will be sent via POST method

            The parameters we pass:
            msg_id - a unique string identifier for the SMS in your application that you specified when sending the SMS;
            smsc_id - unique string ID of the SMS provider. You provide it to us when sending an SMS for routing, so the SMPP client knows which connection to use for sending the SMS;
            gateway_msg_id - string ID of the SMS/segment in the SMSC. We receive this parameter from the SMS provider after they have accepted the SMS, i.e., for the status «sent» and subsequent ones;
            total_parts - numeric value of the number of segments in the sent SMS. If the message is split into 3 parts, then «total_parts=3»;
            part_number - numeric value of the segment in the sent SMS (from 1 to 10). When splitting the message into segments, «part_number» is unique for each segment within a single SMS;
            data_coding - numeric value of the SMS text encoding. 0 - if 7-bit, 2 - if 8-bit, and 8 - if 16-bit;
            status - string value, up to 15 characters. It can be:
            · «accepted» - the send request has been received (encoding has been determined and, if necessary, split into segments);
            · «sent» - SMS/segment has been sent to the SMSC and gateway_msg_id has been received from the SMSC;
            · «delivered» - this is the final status, indicating that the SMS/segment has been delivered to the recipient's phone;
            · «undelivered» - this is the final status, meaning that the SMS/segment has not been delivered. The possible error code will be in «err_code»;
            · «rejected» - this is the final status, meaning that the SMS/segment has been rejected by the SMPP client or the SMS provider. The error code will be in «err_code»;
            · «expired» - this is the final status, meaning that a delivery report was not received within 24 hours. If «err_code» is greater than 0, it is likely that the message was not forwarded beyond the SMSC;
            · «unknown» - this is the final status, meaning that there was a break in the SMSC chain and it is unknown whether the SMS was delivered to the recipient.
            err_code - numeric value of the SMPP error code. The full list is available at the link SMPP error codes;
            acpt_time - Unix Timestamp (with milliseconds) when the SMPP client received the SMS/segment for further sending;
            sent_time - Unix Timestamp (with milliseconds) when the SMPP client sent the SMS/segment to the provider;
            smsc_time - Unix Timestamp (with milliseconds) when the SMPP client received confirmation from the SMS provider and accepted the SMS/segment ID («gateway_msg_id»);
            dlr_time - Unix Timestamp (with milliseconds) when the SMPP client received the delivery report (deliver_sm or data_sm) from the provider;

            The server response must be «status=200 OK»; otherwise, the SMPP-Converter will attempt to resend the request.

                                          
              import requests
              
              resp = requests.get('https://smpp-converter.com/api/message/smsc/list/', 
                  headers={
                      'X-API-Key': 'Your API-key',
                  },
                  params={
                      'page': 1,
                      'status': 'delivered', 
                      'start_date': '2024-08-25',
                      'end_date': '2024-08-27',
                  })
              print(resp.json())
                                          
                                      
                
                                          
              $ch = curl_init('https://smpp-converter.com/api/message/smsc/list/?' . http_build_query([
                  'page' => 1,
                  'status' => 'delivered',
                  'start_date' => '2024-08-25',
                  'end_date' => '2024-08-27',
              ]));
              
              curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
              curl_setopt($ch, CURLOPT_HTTPHEADER, [
                  'X-API-Key: Your API-key',
              ]);
              
              $response = curl_exec($ch);
              curl_close($ch);
              
              $data = json_decode($response, true);
              print_r($data);
                                          
                                      
                
                                          
              fetch('https://smpp-converter.com/api/message/smsc/list/?' + new URLSearchParams({
                  page: 1,
                  status: 'delivered',
                  start_date: '2024-08-25',
                  end_date: '2024-08-27'
              }), {
                  headers: { 'X-API-Key': 'Your API-key' }
              })
              .then(response => response.json())
              .then(data => console.log(data))
              .catch(error => console.error('Error:', error));
                                          
                                      
                                          
              package main
              
              import (
                  "fmt"
                  "io/ioutil"
                  "net/http"
                  "net/url"
              )
              
              func main() {
                  baseURL := "https://smpp-converter.com/api/message/smsc/list/"
                  params := url.Values{}
                  params.Add("page", "1")
                  params.Add("status", "delivered")
                  params.Add("start_date", "2024-08-25")
                  params.Add("end_date", "2024-08-27")
              
                  fullURL := fmt.Sprintf("%s?%s", baseURL, params.Encode())
                  req, err := http.NewRequest("GET", fullURL, nil)
                  if err != nil {
                      fmt.Println("Error creating request:", err)
                      return
                  }
                  req.Header.Add("X-API-Key", "Your API-key")
              
                  client := &http.Client{}
                  resp, err := client.Do(req)
                  if err != nil {
                      fmt.Println("Error making request:", err)
                      return
                  }
                  defer resp.Body.Close()
              
                  body, err := ioutil.ReadAll(resp.Body)
                  if err != nil {
                      fmt.Println("Error reading response body:", err)
                      return
                  }
              
                  fmt.Println(string(body))
              }
                                          
                                      
                                          
              import java.io.BufferedReader;
              import java.io.InputStreamReader;
              import java.net.HttpURLConnection;
              import java.net.URL;
              import java.net.URLEncoder;
              
              public class Main {
                  public static void main(String[] args) throws Exception {
                      String baseUrl = "https://smpp-converter.com/api/message/smsc/list/";
                      String params = String.format("?page=%s&status=%s&start_date=%s&end_date=%s", 
                          URLEncoder.encode("1", "UTF-8"), 
                          URLEncoder.encode("delivered", "UTF-8"), 
                          URLEncoder.encode("2024-08-25", "UTF-8"), 
                          URLEncoder.encode("2024-08-27", "UTF-8")
                      );
              
                      URL url = new URL(baseUrl + params);
                      HttpURLConnection conn = (HttpURLConnection) url.openConnection();
                      conn.setRequestMethod("GET");
                      conn.setRequestProperty("X-API-Key", "Your API-key");
              
                      BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
                      String inputLine;
                      StringBuilder content = new StringBuilder();
                      while ((inputLine = in.readLine()) != null) {
                          content.append(inputLine);
                      }
                      in.close();
                      conn.disconnect();
              
                      System.out.println(content.toString());
                  }
              }
                                          
                                      
              HTTP Response (Status 200):
                                      
              {
                  "count": 1234567,
                  "next": "https://smpp-converter.com/api/message/smsc/list/?page=2",
                  "previous": null,
                  "results": [
                      {
                          "msg_id": "074b8a96-f983-4b0b-8079-4d4c8502ff02",
                          "smsc_id": "mysmsc-id-example",
                          "msg_prefix": "Have ",
                          "msg_suffix": " day!",
                          "sender": "MySender",
                          "receiver": "380991234567",
                          "parts_count": 1,
                          "amount_usd": "0.00100000",
                          "updated": "2024-08-25T15:52:55.742160Z",
                          "created": "2024-08-25T15:52:55.327667Z",
                          "message_parts": [
                              {
                                  "gateway_msg_id": "655a1b96a6c90b528d62397caec3c15d5d7dddccacaf9aae6feed22c0b9f9b15",
                                  "part": 1,
                                  "acpt_time": 1724601175913,
                                  "sent_time": 1724601175933,
                                  "smsc_time": 1724601175951,
                                  "dlr_time": 1724601177612,
                                  "coding": 0,
                                  "err_code": 0,
                                  "callback_code": 0,
                                  "status": "delivered",
                                  "updated": "2024-08-25T15:53:30.518603Z",
                                  "created": "2024-08-25T15:52:55.740998Z"
                              },
                              ...
                          ]
                      },
                      ...
                  ]
              }
                                      
                                  
              HTTP Response (Status 403):
                                      
              Insufficient api_key.permissions to perform this operation.
                                      
                                  

              Receiving a list of sent SMS

              You can view the list of sent SMS in your account under the «Sent SMS» tab. However, if you need to display the list in your application, use the HTTP API. To retrieve the list of sent SMS, perform a GET request to the endpoint https://smpp-converter.com/api/message/smsc/list/

              Parameters to be passed:
              page - page number. By default, «page=1», which returns the most recent records;
              page_size - maximum number of 1000. Defines the number of records per page. By default, «page_size=25»;
              msg_id - unique string identifier of the SMS in your application. Search by exact match;
              smsc_id - string IDs of SMS providers, separated by commas. Searches for all SMS sent to the specified SMSCs. Example: «smsc_id=mysmsc-id-example,mysmsc-id-2»;
              gateway_msg_id - string ID of the SMS/segment in the SMS provider. Search by exact match;
              receiver - recipient's phone number in international format (without special characters). Search by exact match;
              status - search for sent SMS by their status. Possible values are «accepted, sent, rejected, delivered, undelivered, expired, unknown»;
              start_date - string parameter defining the start date of the search. Format: 2006-01-02;
              end_date - string parameter defining the end date of the search. Format: 2006-01-02;

              The response will be a two-dimensional array:
              count - total number of records found based on the specified criteria and filters;
              next - URL of the next page. If the value is NULL, it indicates that this is the last page;
              previous - URL of the previous page. If the value is NULL, it indicates that this is the first page;
              results - list of found SMS messages with nested segments.

              Each SMS message object consists of:
              msg_id - unique string identifier of the SMS in your application;
              smsc_id - unique string ID of the SMS provider through which the message was sent;
              msg_prefix - first 5 characters of the SMS text;
              msg_suffix - last 5 characters of the SMS text. It may be empty or less than 5 characters;
              sender - sender's name in the SMS;
              receiver - recipient's phone number;
              parts_count - number of segments in the SMS. Defaults to 1 if the message was not split into parts. Typically, the nested list «message_parts» equals the value of «parts_count»;
              amount_usd - commission deducted from the balance for conversion;
              updated - date in ISO 8601 format of the last update to the message;
              created - date in ISO 8601 format of message creation in SMPP-Converter;
              message_parts - list of all segments of the given SMS.

              Each SMS segment object consists of:
              gateway_msg_id - string ID of the segment on the SMS provider's side;
              part - sequential number of the segment. Defaults to 1 for messages without splitting;
              acpt_time - Unix Timestamp (with milliseconds) when the SMPP client received the segment for further sending;
              sent_time - Unix Timestamp (with milliseconds) when the SMPP client sent the segment to the provider;
              smsc_time - Unix Timestamp (with milliseconds) when the SMPP client received confirmation from the SMS provider and accepted the segment ID («gateway_msg_id»);
              dlr_time - Unix Timestamp (with milliseconds) when the SMPP client received the delivery report (deliver_sm or data_sm) from the provider;
              coding - numeric value of the SMS/segment text encoding. 0: if 7-bit, 2: 8-bit and 8: 16-bit;
              err_code - SMPP error code. A value of 0 indicates no errors;
              callback_code - HTTP status code of the client's webhook response. A value of 0 indicates that the SMS was sent through the account or that the «callback URL (webhook)» was not specified in the API key settings;
              status - status of the SMS segment. It can be «accepted, sent, rejected, delivered, undelivered, expired, unknown»;
              updated - date in ISO 8601 format of the last update to the segment;
              created - date in ISO 8601 format of the segment's creation in the SMPP-Converter.

                                            
                resp = requests.get('https://smpp-converter.com/api/log/smsc/list/', 
                    headers={
                        'X-API-Key': 'Your API-key',
                    },
                    params={
                        'dateFrom': '2024-08-25', 
                        'dateTo': '2024-08-26', 
                        'smscIds[]': ['mysmsc-id-example'],
                    })
                print(resp.json())
                                            
                                        
                  
                                            
                $params = [
                    'dateFrom' => '2024-08-25',
                    'dateTo' => '2024-08-26',
                    'smscIds' => ['mysmsc-id-example'],
                ];
                
                $url = "https://smpp-converter.com/api/log/smsc/list/?" . http_build_query($params);
                
                $ch = curl_init($url);
                curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                curl_setopt($ch, CURLOPT_HTTPHEADER, ['X-API-Key: Your API-key']);
                $response = curl_exec($ch);
                curl_close($ch);
                
                print_r(json_decode($response, true));
                                            
                                        
                  
                                            
                const params = new URLSearchParams({
                    dateFrom: '2024-08-25',
                    dateTo: '2024-08-26',
                    'smscIds[]': 'mysmsc-id-example'
                });
                
                fetch(`https://smpp-converter.com/api/log/smsc/list/?${params.toString()}`, {
                    headers: {
                        'X-API-Key': 'Your API-key'
                    }
                })
                .then(response => response.json())
                .then(data => console.log(data))
                .catch(error => console.error('Error:', error));
                                            
                                        
                                            
                package main
                
                import (
                    "encoding/json"
                    "fmt"
                    "net/http"
                    "net/url"
                )
                
                func main() {
                    params := url.Values{
                        "dateFrom":  {"2024-08-25"},
                        "dateTo":    {"2024-08-26"},
                        "smscIds[]": {"mysmsc-id-example"},
                    }
                
                    reqURL := fmt.Sprintf("%s?%s", "https://smpp-converter.com/api/log/smsc/list/", params.Encode())
                    req, _ := http.NewRequest("GET", reqURL, nil)
                    req.Header.Set("X-API-Key", "Your API-key")
                
                    resp, _ := http.DefaultClient.Do(req)
                    defer resp.Body.Close()
                
                    var result map[string]interface{}
                    json.NewDecoder(resp.Body).Decode(&result)
                
                    fmt.Println(result)
                }
                                            
                                        
                                            
                import java.net.URI;
                import java.net.http.HttpClient;
                import java.net.http.HttpRequest;
                import java.net.http.HttpResponse;
                import java.net.URLEncoder;
                import java.nio.charset.StandardCharsets;
                import java.util.Map;
                import java.util.StringJoiner;
                
                public class Main {
                    public static void main(String[] args) throws Exception {
                        Map params = Map.of(
                            "dateFrom", "2024-08-25",
                            "dateTo", "2024-08-26",
                            "smscIds[]", "mysmsc-id-example"
                        );
                
                        StringJoiner sj = new StringJoiner("&");
                        for (Map.Entry entry : params.entrySet()) {
                            sj.add(URLEncoder.encode(entry.getKey(), StandardCharsets.UTF_8) + "=" 
                                + URLEncoder.encode(entry.getValue(), StandardCharsets.UTF_8));
                        }
                
                        String url = "https://smpp-converter.com/api/log/smsc/list/?" + sj.toString();
                
                        HttpClient client = HttpClient.newHttpClient();
                        HttpRequest request = HttpRequest.newBuilder()
                            .uri(URI.create(url))
                            .header("X-API-Key", "Your API-key")
                            .build();
                
                        HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
                
                        System.out.println(response.body());
                    }
                }                                
                                            
                                        
                HTTP Response (Status 200):
                                        
                [
                    {
                        "date": "2024-08-25",
                        "name": "mysmsc-id-example.log",
                        "size": 3539546,
                        "modTime": "2024-08-25T23:59:55.816298164"
                    },
                    {
                        "date": "2024-08-26",
                        "name": "mysmsc-id-example.log",
                        "size": 2382360,
                        "modTime": "2024-08-26T12:04:11.817023138"
                    },
                ...
                ]
                                        
                                    
                HTTP Response (Status 403):
                                        
                Insufficient api_key.permissions to perform this operation.
                                        
                                    

                Retrieving the list of SMPP Client logs

                You can view the list of SMSC logs in your account under the «SMPP Logs» tab. However, if you need to display the list in your application, use the HTTP API. To retrieve the list of SMPP log files, perform a GET request to the endpoint https://smpp-converter.com/api/log/smsc/list/

                Parameters to be passed:
                dateFrom - required string parameter defining the start date of the search. Format: 2006-01-02;
                dateTo - required string parameter defining the end date of the search. Format: 2006-01-02;
                smscIds - string IDs of SMS providers. Example: «smscIds[]=mysmsc-id-example&smscIds[]=mysmsc-id-2».

                The response will include a list of log files and their properties. Each object consists of:
                date - date in the format «2006-01-02». A new SMPP log file is created daily for each provider, and logs are written to it until a new file is created;
                name - filename. Required for detailed viewing or downloading the logs;
                size - the file size in bytes;
                modTime - date/time in ISO 8601 format of the last modification.

                CONCAT(date, name) forms a unique file identifier. To subsequently download or view its contents, you need to provide this concatenated params (date + name) to identify the log file on the server.

                                              
                  import requests
                  
                  resp = requests.get('https://smpp-converter.com/api/log/smsc/download/', 
                      headers={
                          'X-API-Key': 'Your API-key',
                      },
                      params={'files[]': ['2024-08-25mysmsc-id-example.log']})
                  print(resp.text)
                                              
                                          
                                              
                  $curl = curl_init();
                  
                  curl_setopt_array($curl, array(
                      CURLOPT_URL => 'https://smpp-converter.com/api/log/smsc/download/?files[]=2024-08-25mysmsc-id-example.log',
                      CURLOPT_RETURNTRANSFER => true,
                      CURLOPT_HTTPHEADER => array(
                      'X-API-Key: Your API-key'
                      ),
                  ));
                  
                  $response = curl_exec($curl);
                  curl_close($curl);
                  
                  echo $response;
                                              
                                          
                                              
                  fetch('https://smpp-converter.com/api/log/smsc/download/?files[]=2024-08-25mysmsc-id-example.log', {
                      method: 'GET',
                      headers: {
                          'X-API-Key': 'Your API-key'
                      }
                  })
                  .then(response => response.text())
                  .then(data => console.log(data))
                  .catch(error => console.error('Error:', error));
                                              
                                          
                                              
                  package main
                  
                  import (
                      "fmt"
                      "io/ioutil"
                      "net/http"
                  )
                  
                  func main() {
                      client := &http.Client{}
                      req, err := http.NewRequest("GET", "https://smpp-converter.com/api/log/smsc/download/?files[]=2024-08-25mysmsc-id-example.log", nil)
                      if err != nil {
                          fmt.Println("Error creating request:", err)
                          return
                      }
                  
                      req.Header.Set("X-API-Key", "Your API-key")
                  
                      resp, err := client.Do(req)
                      if err != nil {
                          fmt.Println("Error making request:", err)
                          return
                      }
                      defer resp.Body.Close()
                  
                      body, err := ioutil.ReadAll(resp.Body)
                      if err != nil {
                          fmt.Println("Error reading response body:", err)
                          return
                      }
                  
                      fmt.Println(string(body))
                  }
                                              
                                          
                                              
                  import java.net.URI;
                  import java.net.http.HttpClient;
                  import java.net.http.HttpRequest;
                  import java.net.http.HttpResponse;
                  
                  public class Main {
                      public static void main(String[] args) {
                          HttpClient client = HttpClient.newHttpClient();
                  
                          HttpRequest request = HttpRequest.newBuilder()
                                  .uri(URI.create("https://smpp-converter.com/api/log/smsc/download/?files[]=2024-08-25mysmsc-id-example.log"))
                                  .header("X-API-Key", "Your API-key")
                                  .build();
                  
                          client.sendAsync(request, HttpResponse.BodyHandlers.ofString())
                                  .thenApply(HttpResponse::body)
                                  .thenAccept(System.out::println)
                                  .join();
                      }
                  }
                                              
                                          
                  HTTP Response (Status 200):
                                          
                  ...
                  INFO[2024-07-29 21:02:05][1beb339d-24dd-4abc-a1c3-9e77d88856ab]: >>>>> 000000450000000400000000000000080005004d7953656e6465720001013338303939313233343536370000000000000100000110486176652061206e6963652064617921
                  SUBMIT_SM: 
                  {
                      "Header": {
                      "command_length": 69,
                      "command_id": 4,
                      "command_status": 0,
                      "sequence_number": 8
                      },
                      "service_type": "",
                      "source_addr_ton": 5,
                      "source_addr_npi": 0,
                      "source_addr": "MySender",
                      "dest_addr_ton": 1,
                      "dest_addr_npi": 1,
                      "destination_addr": "380991234567",
                      "esm_class": 0,
                      "protocol_id": 0,
                      "priority_flag": 0,
                      "schedule_delivery_time": "",
                      "validity_period": "",
                      "registered_delivery": 1,
                      "replace_if_present_flag": false,
                      "message": {
                          "data_coding": 0,
                          "sm_default_msg_id": 1,
                          "short_message": "Have a nice day!"
                      }
                  }
                  INFO[2024-07-29 21:02:06][1beb339d-24dd-4abc-a1c3-9e77d88856ab]: <<<<< 000000518000000400000000000000083635356131623936613663393062353238643632333937636165633363313564356437646464636361636166396161653666656564323263306239663962313500
                  SUBMIT_SM_RESP: 
                  {
                  "Header": {
                      "command_length": 81,
                      "command_id": 2147483652,
                      "command_status": 0,
                      "sequence_number": 8
                  },
                  "message_id": "655a1b96a6c90b528d62397caec3c15d5d7dddccacaf9aae6feed22c0b9f9b15"
                  }
                  ...
                                          
                                      
                  HTTP Response (Status 403):
                                          
                  Insufficient api_key.permissions to perform this operation.
                                          
                                      

                  Viewing/Exporting SMPP Client Logs

                  You can view or download SMPP logs in your account under the «SMPP Logs» tab. However, if you need to export logs to your application, use the HTTP API. To view an SMPP log file or export an archive, perform a GET request to the endpoint https://smpp-converter.com/api/log/smsc/download/

                  Parameters to be passed:
                  files - CONCAT(date, smsc_id, ".log") is the ID of SMPP files. Example: «files[]=2024-08-25mysmsc-id-example.log»;

                  If the number of «files[]» is greater than 1, the server response will be a ZIP archive containing the files of the requested SMPP logs.
                  If the number of «files[]» is equal to 1, the server response will contain the contents of the SMPP log file with GZIP compression.