#

# Run as a web server to get messages from other application by HTTP get/post.

Note: Only ultimate edition support HTTP API

# Configuration

# Send single SMS by HTTP Get

http://127.0.0.1:8888?username=&password=&to=123456&message=hello%20world&prior=0&com=COM4&imsi=460123456000000

Response:  b4e320a4-704a-48fb-9015-1c27b8d57c85

Normally if user doesn't specify the ID field, software will assign an ID for each message and response with this ID.

Or

http://127.0.0.1:8888?ID=99123345678&username=&password=&to=123456&message=hello%20world&prior=0&com=COM4&imsi=460123456000000

Response: 99123345678

If user specify the ID for message, software will response this ID once software get the message correctly.

Fields:

[host ip]:[port] Server IP and port
username Checked option 'Authentication'  and predefine the username
password Checked option 'Authentication' and predefine the password
to destination phone number
message SMS text
prior process message with prior, add the message to top of outbox
com send SMS with specified COM port
imsi send SMS with specified SIM card

# Send single SMS by HTTP POST request  (UTF-8)

  • # content-type: multipart/form-data

Code Block title
 POST / HTTP/1.1  
 HOST: 127.0.0.1:8888  
 accept-language: 
   en-US,en;q=0.8  
 user-agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) 
   AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 
   Safari/537.36   
 content-type: multipart/form-data; 
   boundary=----WebKitFormBoundaryIP9zWxvqjDl9qree  
 content-length: 436
 
 ------WebKitFormBoundaryIP9zWxvqjDl9qree  
 Content-Disposition: form-data; name=username;
 
 111  
 ------WebKitFormBoundaryIP9zWxvqjDl9qree  
 Content-Disposition: form-data; name=password;
 
 222  
 ------WebKitFormBoundaryIP9zWxvqjDl9qree  
 Content-Disposition: form-data; name=to;
 
 999999  
 ------WebKitFormBoundaryIP9zWxvqjDl9qree  
 Content-Disposition: form-data; name=message;
 
 message  
 ------WebKitFormBoundaryIP9zWxvqjDl9qree--

Response:xxxxxxx (message ID)

# Send mulitple SMS by HTTP POST request  (UTF-8)

  • # content-type: application/json

Example:

Code Block title
POST / HTTP/1.1
HOST: 127.0.0.1:8888
content-type: application/json
accept: application/json
accept-encoding: gzip, deflate
accept-language: en-US,en;q=0.8
user-agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safari/537.36
content-length: 672
{
  "username": "username",
  "password": "pwd",
  "messages": [
    {
      "id": "c7d05392-ecd6-4f99-8618-36fd6b39115f",
      "to": "9824539094",
      "message": "महेंद्र मेरा भई है",
      "com": "",
      "imsi": "",
      "prior": ""
    },
    {
      "id": "ebf79454-8e55-4c9a-8387-af1570101b32",
      "to": "9075012639",
      "message": "test message 2",
      "com": "",
      "imsi": "",
      "prior": ""
    },
    {
      "id": "c7d05392-ecd6-4f99-8618-36fd6b39115f",
      "to": "9324539094",
      "message": "test message 1",
      "com": "",
      "imsi": "",
      "prior": ""
    }   
  ]
}

Response: OK

# Get all connected SIM card phone number

Get: http://localhost:8888/getsiminfo

Response: {"status":"running","siminfo":[{"imsi":"370029417082291","com":"COM20","phoneno":"+8861563742346"},{"imsi":"373029417082291","com":"COM21","phoneno":"+1031526856"}]}

# Get messages volume of outbox

Get: http://localhost:8888/outbox

Response: 300,0,0,0,0,0  (outbox will separate to 6 standalone outboxes if 'Queue' is enabled.)

# Example for HTTP tool (ARC/POSTMAN)

  1. Start HTTP Service

2.Send a single message

3.Send multiple messages by JSON

# Send single MMS by HTTP Post

Fields:

[host ip]:[port] Server IP and port
username Checked option 'Authentication'  and predefine the username
password Checked option 'Authentication' and predefine the password
to destination phone number
subject MMS subject
body MMS body (txt file)
attachment MMS attachment (image,voice file)
prior process message with prior, add the message to top of outbox
com send SMS with specified COM port
imsi send SMS with specified SIM card