Documentation | SmsGateway24.com
                        v.1.0
                    
                    
                    
    1. Getting a token:
    
        Description: Upon successful execution of this query, you will receive a token. Subsequently, you can use this token to access the server and make additional requests.
        
        Endpoint: https://smsgateway24.com/getdata/gettoken
        
        Method:: GET
    
    
        Parameters of the request:
        
            
            
                | Variable | 
                Type | 
                Description | 
            
            
            
            
                | email | 
                string | 
                [required] Your login in the system. Usually email | 
            
            
                | pass | 
                string | 
                [required] Your password in the system | 
            
            
        
     
    
    
        JSON-formatted response::
        
            
            
                | Variable | 
                Type | 
                Description | 
            
            
            
            
                | token | 
                string | 
                Your token is acquired through the token retrieval method:
                 | 
            
            
                | error | 
                int | 
                0 | 1 - indicates whether there is an error in processing the request | 
            
            
                | message | 
                string | 
                Error message, empty if everything is in order. | 
            
            
        
     
    
                              Link to code example Curl
                            
                              Link to code example Guzzle
                            
                        
    
                                Example of the response: 
                                {"error":0,"message":"OK","token":"abbde3e31e9d026c02f41119fc551111e"}
                                
                                or
                                
                                {"error":1,"message":"Login or password incorrect"}
                            
    
                     
    2. Send SMS using Sender ID. (POST)
    
        Description:
        When you requested a Sender ID for your company, you can send SMS API requests.
        
        Endpoint: https://smsgateway24.com/getdata/addsmstosenderid
        
        Method::  POST
    
    
        Parameters of the request as JSON like:
{
    "token":"5f0eb980819f0e07b9b14d5dsacxzc6a",
    "send_to":"+4915752982212",
    "sender_id":"2",
    "template_id":"9",
    "webhook_callback_url":"https://webhook.site/5557129a-8513-4cb8-ae2e-8aa17a5bb957",
    "template_data":{
        "var_1":"John",
        "order":"777"
    }
}
        Where:
        
            
            
                | Variable | 
                Type | 
                Description | 
            
            
            
            
                | token | 
                string | 
                [required] Your token is acquired through the token retrieval method. | 
            
            
                | send_to | 
                string | 
                [required] Phone number of the customer. For example: +4915752982212  | 
            
            
                | sender_id | 
                string | 
                [required] IDs Of your sender ID. You can find your Sender IDs here:
                    Sender ID list | 
            
            
                | template_id | 
                string | 
                [required] You can get your template IDs here:Template list | 
            
            
                | webhook_callback_url | 
                string | 
                [optional] Set your server URL to get callbacks  | 
            
            
                | template_data | 
                json | 
                [optional] Your dynamic variable names.  | 
            
            
        
     
    
    
        JSON-formatted response::
        
            
            
                | Variable | 
                Type | 
                Description | 
            
            
            
            
                | token | 
                string | 
                Your token is acquired through the token retrieval method:
                 | 
            
            
                | error | 
                int | 
                0 | 1 - indicates whether there is an error in processing the request | 
            
            
                | message | 
                string | 
                Error message, empty if everything is in order. | 
            
            
                | cost | 
                float | 
                SMS cost | 
            
            
        
     
    
                                Example of the response: 
                                 {"error":0,"sms_id":63752087,"message":"Sms has been saved successfully","cost":0.068}
                            
    
 
    3. Send SMS using Sender ID.  (GET)
    
        Description:
        When you requested a Sender ID for your company, you can send SMS API requests.
        
        Endpoint: https://smsgateway24.com/getdata/addsmstosenderid
        
        Method::  GET
    
    
        Parameters of the request as JSON like:
        Where:
        
            
            
                | Variable | 
                Type | 
                Description | 
            
            
            
            
                | token | 
                string | 
                [required] Your token is acquired through the token retrieval method. | 
            
            
                | send_to | 
                string | 
                [required] Phone number of the customer. For example: +4915752982212  | 
            
            
                | sender_id | 
                string | 
                [required] IDs Of your sender ID. You can find your Sender IDs here:
                    Sender ID list | 
            
            
                | template_id | 
                string | 
                [required] You can get your template IDs here:Template list | 
            
            
                | webhook_callback_url | 
                string | 
                [optional] Set your server URL to get callbacks  | 
            
            
                | template_data_as_string | 
                json | 
                [optional] Your dynamic variable names.  | 
            
            
        
     
    
    
        JSON-formatted response::
        
            
            
                | Variable | 
                Type | 
                Description | 
            
            
            
            
                | token | 
                string | 
                Your token is acquired through the token retrieval method:
                 | 
            
            
                | error | 
                int | 
                0 | 1 - indicates whether there is an error in processing the request | 
            
            
                | message | 
                string | 
                Error message, empty if everything is in order. | 
            
            
                | cost | 
                float | 
                SMS cost | 
            
            
        
     
    
                                Example of the request: 
                                https://smsgateway24.com/getdata/addsmstosenderid?token=5f0eb980819f0e07b9b1432132131d&send_to=+4915752982212&sender_id=1&template_id=8&template_data_as_string={"order":"order1","date":"010202"}
                            
    
    
                                Example of the response: 
                                 {"error":0,"sms_id":63752087,"message":"Sms has been saved successfully","cost":0.068}