API開發文檔

歡迎流覽我們的API開發文檔!

獲取短信列表

GET

/api/sms/:date

權限:短信

Header
字段類型描述
Content-Type字符串應用或JSON
參數
字段類型描述
date字符串日期格式爲“YYYY-MM-DD”或“YYYY-MM”
請求樣例
/api/sms/2017-10
成功 200
字段類型描述
totalRows數值符合篩選日期的短信總數量
rows對象數組短信列表
messageId字符串短信的唯一編號
time字符串短信髮送時間
from字符串髮送方電話號碼
to字符串接收方電話號碼
text字符串短信或彩信的文本內容
media字符串數組彩信中多媒體(多數爲圖片)URL地址的數組
direction字符串短信髮送方向,值爲以下其中之一:[”inbound”, ”outbound”]
charge字符串短信費用
state字符串短信狀態
成功響應
HTTP/1.1 200 OK
 {
     "totalRows": 3,
     "rows": [{"messageId": "SMS_SM905869894f9745e1b9fe6468789deec8", "time": "2017-10-31T21:59:22.375Z", "from": "16473451234", "to": "14168901234", "text": "Hello", "direction": "outbound", "charge": 0.015, "state": "delivered"},
             {"messageId": "SMS_SMca92be6c44214c1aaebde43eb6b2f164", "time": "2017-10-31T21:58:50.735Z", "from": "16473451234", "to": "14168901234", "text": "erh", "direction": "outbound", "charge": 0.015, "state": "delivered"},
             {"messageId": "SMS_MM50f9b7b8e4ec0723480d97e1d3bb1949", "time": "2017-10-31T21:43:19.239Z", "from": "14168901234", "to": "16473451234", "text": "", "media": ["http://example.com/abd.png"], "direction": "inbound", "charge": 0.02, "state": "received"}]
 }




标签:
Table of Contents