Slide
SMS API

API date for developer

Slide

Home

Help Center

SMS API

Sign Signature Rule

Generate Signature: Put API Key+API Secret + Timestamp(second) into string with 32 bit MD5 format.(Case Insensitive)

For Example:

Parameters

Put API Key:bDqJFiq9
API Secret:7bz1lzh9 Timestamp(second):1630468800

Method

MD5(bDqJFiq97bz1lzh91630468800)

Sign

05d7a50893e22a5c4bb3216ae3396c7c

Request header parameter:

Header Parameter Description Type
Content-Type application/json;charset=UTF-8 String
Sign Signature with encryption String
Timestamp Current system time stamp (second), it should be within half an hour of the system time String
Api-Key Setting -Account -API Management- API KEY String

status

Response status code description:

status reason
0 success
-1 authentication error
-2 IP access limited
-3 SMS contents with sensitive characters
-4 SMS content is empty
-5 SMS content is over the length
-6 SMS contents are out of template
-7 numbers are over the limitation
-8 number is empty
-9 numbers are abnormal
-10 insufficient balance which unable to support the task
-11 incorrect timing format
-12 due to platform issue,bulk submission has been failed,please contact Admin
-13 users has been locked
-14 Field is empty or inquiry id is abnormal
-15 query too frequently
-16 timestamp expires
-17 SMS template can not be empty
-18 port program unusual
-19 Please contact our Account Manager for your SMS Journey after the authentication

Sending Messages

interface name

sendSms

Description

The protocol is used to send SMS,supporting single number or multiple numbers

Request Method

Support GET or POST,GET can support 100 numbers once ,POST can support 1000 numbers once

request URL:

https://api.onbuka.com/v3/sendSms

Request Parameters Description:

Parameters Description Required or not type
appId App ID (Account Management - App Management -appId properties) Yes String
numbers receiving number,multiple numbers should be separated with comma GET can support 100 numbers once ,POST can support 1000 numbers once) Yes String
content SMS content,length should not be over the 1024 characters.(GET should use urlEncode) Yes String
senderId sender number(name) No String

Sample:use GET request to send content “hellow word”:

Request URL:https://api.onbuka.com/v3/sendSms?appId=4luaKsL2&numbers=91856321412,91856321413&content=hellow%20word&senderId=123 Request Method: GET Request Headers: Content-Type: application/json;charset=UTF-8 Sign: 05d7a50893e22a5c4bb3216ae3396c7c Timestamp: 1630468800 Api-Key: bDqJFiq9

Sample:use POST request to send content “hellow word”:

Request URL: https://api.onbuka.com/v3/sendSms Request Method:POST Request Headers: Content-Type: application/json;charset=UTF-8 Sign: 05d7a50893e22a5c4bb3216ae3396c7c Timestamp: 1630468800 Api-Key: bDqJFiq9 Request Body: { "appId":"4luaKsL2", "numbers":"91856321412,91856321413", "content":"hellow word", "senderId":"123" }

Response Parameters Description:

Parameters Description type
status ”0”means successful,others than 0 means failure ,seeing Status code description. String
reason failure reason description String
success number of successful submitted numbers String
fail number of failure submitted numbers String
array the number of Successful Submitted Array. JSONArray
msgId submitted numbers id corresponding to platform String
number submitted numbers String

Note:After submitting messages successfully,system will generate one msgld correspond with each successful submission numbers.
Clients can use the msgld to check the number submission result.

Response Sample:

{ "status":"0", "reason":"success", "success":"2", "fail":"0", "array":[ { "msgId":"2108021054011000095", "number":"91856321412" }, { "msgId":"2108021059531000096", "number":"91856321413" } ] }

Balance Query

interface name

getBalance

Description

The protocol is used to get account balance

Request Method

GET

Request URL:

https://api.onbuka.com/v3/getBalance

Request Sample:

Request URL: https://api.onbuka.com/v3/getBalance Request Method: GET Request Headers: Content-Type: application/json;charset=UTF-8 Sign: 05d7a50893e22a5c4bb3216ae3396c7c Timestamp: 1630468800 Api-Key: bDqJFiq9

Response Parameters Description:

Parameters Parameters type
status ”0”means successful,others than 0 means failure ,seeing Status code description. String
reason failure reason description String
balance failure reason description String
gift gifted account balance String

Response Sample:

{ "status":"0", "reason": "success", "balance": "99.990000", "gift": "50.00000" }

Get Report

interface name

getReport

Description

The protocol is used to query the submission result of specific msgId array

Request Method

GET

Request URL:

https://api.onbuka.com/v3/getReport?appId={appId}&msgIds={msgIds}

Request Parameters Description:

Parameters Description Required or not type
appId App ID (Account Management - App Management -appId properties) Yes String
msgIds platform id returned by sendsms protocol response.multiple id should be separated with comma.200 msgId query can be supported once. Yes String

Request Sample:

Request URL:http://api.onbuka.com/v3/getReport?appId=4luaKsL2&msgIds=2108021054011000095,2108021059531000096 Request Method: GET Request Headers: Content-Type: application/json;charset=UTF-8 Sign: 05d7a50893e22a5c4bb3216ae3396c7c Timestamp: 1630468800 Api-Key: bDqJFiq9

Response Parameters Description:

Response Parameters Description: Description type
status ”0”means successful,others than 0 means failure ,seeing Status code description. String
reason failure reason description String
success number of successful submitted messages String
fail number of failure submitted messages String
sending number of sending messages String
nofound The number of nofound messages by ID String
array json array with submission results JSONArray
msgId submitted numbers id corresponding to platform String
number submitted nunbers String
receiveTime receive time ISO8601 standard tine format (2021-02-12T09:30:03+08:00) String
status messages status:0 sent successfully,-1:sending,1:sent failed String

Response Sample:

{ "status":"0", "reason":"success", "success":"2", "fail":"0", "sending":"0", "nofound":"0", "array":[ { "msgId":"2108021054011000095", "number":"91856321412", "receiveTime":"2021-02-12T09:30:03+08:00", "status":"0" }, { "msgId":"2108021059531000096", "number":"91856321413", "receiveTime":"2021-02-12T09:30:03+08:00", "status":"0" } ] }

Get SMS Report by Time Slot

interface name

getSentRcd

interface name

The protocol is used to get SMS report by time slot(from beginning time to ending time)

Request Method

GET

Request URL:

https://api.onbuka.com/v3/getSentRcd?appId={appId}& startTime={startTime}&endTime={endTime}&startIndex={startIndex}

Request Parameters Description:

Parameters Description Required or not type
appId App ID (Account Management - App Management -appId properties) Yes String
startTime beginning time of query,ISO8601 standard time format UrlEncode(2021-02-12T00:00:00+08:00) Yes String
endTime ending time of query,ISO8601 standard time format UrlEncode(2021-02-12T23:59:59+08:00) Yes String
startIndex The starting subscript of the query ( Max 50,000 results can be returned by one query as default.This function and be used for multiple queries when results over 50,000) NO(Default 0) Int

Request Sample:

Request URL:https://api.onbuka.com/v3/getSentRcd?appId=4luaKsL2&startTime=2021-02-12T00%3A00%3A00%2B08%3A00&endTime=2021-02-12T23%3A59%3A59%2B08%3A00&startIndex=0 Request Method: GET Request Headers: Content-Type: application/json;charset=UTF-8 Sign: 05d7a50893e22a5c4bb3216ae3396c7c Timestamp: 1630468800 Api-Key: bDqJFiq9

Response parameters description:

parameters description 类型
status ”0”means successful,others than 0 means failure ,seeing Status code description. String
reason failure reason description String
success number of successful submitted messages String
fail number of failure submitted messages String
array json array with submission results JSONArray
msgId submitted numbers id corresponding to platform String
number submitted nunbers String
receiveTime receive time ISO8601 standard tine format (2021-02-12T09:30:03+08:00) String
status messages status:0 sent successfully,-1:sending,1:sent failed String

Response parameters description:

{ "status":"0", "reason":"success", "success":"2", "fail":"0", "array":[ { "msgId":"2108021054011000095", "number":"91856321412", "receiveTime":"2021-02-12T09:30:03+08:00", "status":"0" }, { "msgId":"2108021059531000096", "number":"91856321413", "receiveTime":"2021-02-12T09:30:03+08:00", "status":"0" } ] }

Get SMS Report Pushed by Skline Platform

Description

user has set http address in the“account-app management” to receive the report, messages status reports will be pushed to user by SKYLINE platform.

Push Method

POST

Push URL

address set by users

Push Parameters Description:

Request URL:Https address set by users Request Method: POST Request Headers: Content-Type: application/json;charset=UTF-8 Request Body: { "appId":"4luaKsL2", "msgid":2108021059531000096, "mobile":"91856321413", "status":0, "timestamp":1629801177192 }

Push Parameters Description:

Parameters Description Required or not type
appId App ID (Account Management - App Management -appId properties) Yes String
msgid submitted numbers id corresponding to platform Yes Long
mobile submitted nunbers Yes String
status messages status:0 sent successfully,-1:sending,1:sent failed Yes Int
timestamp sent timestamp(millisecond) Yes Long

Push Sample:

Http response“200” means success and platform will not verify the response status