API Documents

  • Balance Query
  • Same Content Bulk SMS
  • Different Content Bulk SMS
  • Report Query
  • Bulk Report Query
  • Report Push
  • Q&As

Interface Description


  • 1,Document Name:CHINA SKYLINE SMS API DOCUMENTS (HTTP)
  • 2,Interface protocol: HTTP
  • 3,the encoding format: UTF8
  • 4,the request method: GET, POST
  • 5,Content-Type:application/json;charset=UTF-8
  • 6,For security reasons, we have set up dynamic signatures (Sign),how to generate a Sign?
  • Enter the account name , API key, and request date time to form a string and use MD5 encryption. MD5 uses 32-bit lowercase
  • Example
Parameters MD5 Sign
account:test
password:123456
datetime:20190101120000
MD5(test12345620190101120000) 6ac4928d8d0c3c5ba75981b539c52152
  • Note: The API key is the authentication key,not log in password. You can log into Skyline SMS system(www.globalsms.cn) to get it. The request time (datetime) needs to set GMT + 8 the current time within half an hour, not a timestamp ,include Year, month, day, hour, minute, second

BALANCE REQUEST


  • 1. Interface name: getbalanceV2
  • 2,Interface description: This interface is used to query account balance information
  • 3, the request method: GET
  • 4, the request URL: http://sms.skylinelabs.cc:20003/getbalanceV2?account=***&sign=***&datetime=**
  • 5,Request parameter description
Parameters Description necessary? Type
version Current Version number NO(default1.0) String
account Account Yes String
sign MD5 sign(please see the first paragraph of this document) Yes String
datetime yearmonthdayhourminutesecond Yes String
  • 6,Response Example:{"status":0,"balance":"99.990000", "gift":"50.00000"}
  • 7,Response Code Description
Parameters Description Type
status Inquiry status
0:succeeded
-1:Authentication error
-2:IP access limited
INT
balance The real account balance String
gift The bonus balance String

SEND SMS


  • 1,Interface name: sendsmsV2
  • 2,Interface description: This interface is used to send short messages, which can be sent individually or in batches,The same content is supported. It supports GET and POST request method
  • 3,Request method: GET, POST
  • 4,(GET):
  • URL:http://sms.skylinelabs.cc:20003 /sendsmsV2?account=***&sign=***&datetime=***&senderid=***&numbers=8613611111111,8613722222222&content=***
  • 5、(POST):
  • URL:http://sms.skylinelabs.cc:20003/sendsmsV2?account=***&sign=***&datetime=***
  • The POST request uses json format with the following parameters:
  • {"content":"test","numbers":"8613611111111,8613722222222","senderid":"123 123"}
  • Note: The account, sign, datetime parameters in the POST request must be placed in the URL, and cannot be submitted in json
  • 6,Request parameter description
Parameters Description Necessary? Type
version Current Version number NO(default 1.0) String
account Account Yes String
sign Sign of Md5(please check the details of the first paragraph of this document Yes String
datetime yearmonthdayhourminutesecond Yes String
senderid senderID NO String
numbers Receivers'number,seperate with ',' between numbers(GET support max 100 numbers,POST support max 10000 numbers) Yes String
content Message content(urlEncode needed,short than 1024 bytes) Yes String
  • 7,Response Example:
  • {"status":0, "success":2, "fail":0, "array":[[8613611111111,1901281451030204206], [8613722222222,1901281450470121055]]}
  • 6,Response Code Description:
Parameters Description Type
status Response Code after submit
0:ok
-1:Authentication error
-2:IP access is limited
-3:Sensitive Words
-4:SMS message is empty
-5:SMS message is over length
-6:do not match template
-7:receiver numbers over limit
-8:receiver number empty
-9:receiver number abnormal
-10:balance is low
-11:Incorrect timing format
-12:Due to platform issue,bulk submit is fail,pls contact admin
-13:user locked
-16: Out of time range limit
-17: SMS template is empty
INT
success Number of successful submissions INT
fail Number of failed submissions INT
array The array succeed submit Array including 'number,query ID of sending result ' all data is number format

SEND BULK SMS


  • 1,Interface name: batchsendsmsV2
  • 2,Interface description: This interface is used to send SMS in batches, and supports different numbers to send different content
  • 3, the request method: POST
  • 4, the request URL:
  • POST /batchsendsmsV2?account=***&sign=***&datetime=**** HTTP/1.1
  • Host: http://sms.skylinelabs.cc:20003
  • Content-Type:application/json
  • {"messages":[{"senderid":"0123456789","content":"%E5%85%BB%E8%80%81%E9%87%91%E8%","mobile":["8613611111111","8613722222222"],"smsid":"1"},{"content":"%E5%86%BB%E8%80%81%E9%87%91%E8%","mobile":["8613811111111"],"smsid":"2"}]}
  • Note: The account, sign, datetime parameters in the POST request must be placed in the URL, and cannot be submitted in json
  • 5,Request parameter description
Parameters Description Necessary? Type
version Current Version number NO(default 1.0) String
account Account Yes String
sign Sign of Md5(please check the details of the first paragraph of this document Yes String
datetime yearmonthdayhourminutesecond Yes String
senderid Sender ID NO String
mobile Receivers'number,seperate with ',' between numbers Yes String
content Message content(urlEncode needed,short than 1024 bytes) Yes String
smsid Customized message id Yes String
  • 6,Response Example
  • {"success": 1,"fail": 2,"array": [[0,"8613611111111","1",1901121607180200001],[9,"13722222222","1"],[9,"13811111111","2"]]}
  • 7,Response Code Description
Parameters Description Type
status Response Code after submit
0:ok
-1:Authentication error
-2:IP access is limited
-3:Sensitive Words
-4:SMS message is empty
-5:SMS message is over length
-6:do not match template
-7:receiver numbers over limit
-8:receiver number empty
-9:receiver number abnormal
-10:balance is low
-11:Incorrect timing format
-12:Due to platform issue,bulk submit is fail,pls contact admin
-13:user locked
-14:Smsid is empty
INT
success Number of successful submissions INT
fail Number of failed submissions INT
array The array succeed submit
Array including 'number,query ID of sending result ' all data is number format

GET REPORT


  • 1,Interface name: getreportV2
  • 2,Interface description: This interface is used to query the SMS sending report
  • 3, the request method: GET
  • 4,the request URL:
  • http://sms.skylinelabs.cc:20003/getreportV2?account=***&sign=***&datetime=***&ids=1901281451030204206,1901281450470121055
  • 5,Request parameter description
Parameter Description Necessary? Type
version Current Version number NO(default 1.0) String
account Account Yes String
sign Md5 sign (please check the first paragraph of this document) Yes String
datetime yearmonthdayhourminutesecond Yes String
ids Input the ID auto provided by SYSTEM when submit the id. Multi- numbers must separate by ',' between each other. Max 200 numbers. Yes String
  • 6,Response Example
  • {"status":0, "success":1, "fail":1, "unsent":0, "sending":0, "nofound":0,"array":[[1901281451030204206,"86136****1111",20190128145103,0], [1901281450470121055,"8613722222222",20190128145047,3]]}
  • 7,Response Code Description
Parameter Description Type
status Send Submission Status
0:Submit Success
-1:Authentication error
-2:Restricted IP Access
-3:Sensitive Words
-4:sms message is empty
-5:sms message is over length
-6:do not match template
-7:receiver numbers over limit
-8:receiver number empty
-9:receiver number abnormal
-10:balance is low
-11:Timing format is not right
-12:Du to platform issue,bulk submit is fail,pls contact admin
-13;user locked
-14:Smsid is empty
INT
success Number of successful transmissions INT
fail Number of failed transmissions INT
unsent Number of unsent submissions INT
sending Number of SMS being sent now INT
nofound Number of SMS which ID can't be found INT
array The array succeed submit
Array including 'number/sending time/status of sending result query ID' all data is number format
Status:
0: Succeed
1: Unsent
2:Sending
Others: Fail sending

Get Sent Record


  • 1,the interface name: getsentrcdV2
  • 2,the interface description: TInterface description: This interface is used to query the SMS sending status in batches. The results of the SMS reports that have been sent within the time period between the start time and the end time of the query. The query frequency is up to 1 query per minute. If the frequency is exceeded, the interface will return -15
  • 3,the request method: GET
  • 4,the request URL:
  • http://sms.skylinelabs.cc:20003/getsentrcdV2?account=***&sign=***&datetime=***&date=***&begintime=***&endtime=***&startindex=***
  • 5,Request parameter description
Parameters Description Necessary? Type
version Current Version number NO(Default 1.0) String
account Account Yes String
sign MD5 sign(please see the first paragraph of this document)MD5 sign(please see the first paragraph of this document) Yes String
datetime Time string [year, month, day, hour, minute, second] Yes String
date Query date string [year,month,day] No(Defaut Date of the day) String
begintime Query starting time [hours, minutes and seconds] Yes String
endtime Query ending time [hours,minutes and seconds] NO(Defaut 1 hour after the starting time ) String
startindex The starting subscript of the query (a single query returns up to 50000 results by default, and is available to more than 50,000 points multiple queries) No(Default 0) INT
  • 6,Response Example
  • {"status":0, "totalcnt":2, "retcnt":2, "success":1, "fail":1,"array":[[1902010000230228223,"86136****1111",1548950424,0], [1902010000470228227,"8613722222222",1548950448,3]]}
  • 7,Response Code Description
Parameters Description Type
status Send submission status
0: Get successful
-1: Authentication error
-2: Ip access restricted
-13: User is locked
-14: Query id is abnormal.
-15: Frequent queries
-16: Out of time range limit
INT
success Number of successful transmissions INT
fail Number of failed transmissions INT
array Array of SMS results
The array contains the status query ID,number,sending time,and status of the number in turn,and the data is numeric characters.
Status:
0 sent successfully;
If not 0,sent fail

Push Status Report


  • 1,Interface description: This interface actively pushes the SMS status report to the sender. After the SMS is sent, the system actively pushes the status report to the sender's server. The sender must provide the URL of the receiving interface and reply with a 200 OK response after receiving the push.
  • 2,Push method: POST
  • 3,Push message JSON format
  • Content-Type:application/json
  • { "msgid":1903121607180200001, "mobile":"8613611111111", "status":0, "timestamp":1565222888000 }
  • 4,Parameter description
Parameters Description Type
msgid SMS message ID,This ID is the message ID returned by the sendsms and batchsendsms interfaces INT
mobile 0 sent successfully; String
status 0 sent successfully;
If not 0,sent fail
INT
timestamp SMS sending completion time (time stamp) INT