开发必读

基础域名

  1. https://api.tssns.com/

Content-Type

  1. Content-Type: application/x-www-form-urlencoded;charset=utf-8

API 认证

  1. 从控制台复制 accessKey secretKey

  2. 用冒号连接 accessKey secretKey

  3. base64编码步骤2中连接后的字符串
  4. Basic 认证类型 以及 步骤2编码后的字符串放入 Authorization 请求头
  1. API认证示例
  2. ak = "foo"
  3. sk = "bar"
  4. str = "foo:bar"
  5. base64Str = base64Encode(str)
  6. authorizationStr = "Basic " + base64Str
  7. GET /someapi
  8. Host: https://api.tssns.com
  9. Content-Type: application/x-www-form-urlencoded;charset=utf-8
  10. Authorization: Basic Zm9vOmJhcg==

返回示例

  1. HTTP/1.1 200 OK
  2. {
  3. "code":200,
  4. "msg":"ok",
  5. "data":null
  6. }

HTTP 状态码

状态码 说明
200 成功
404 接口不存在(路由错误)
405 方法不被允许

Code

code 说明
200 成功
400 错误的请求
401 认证失败
601 域名已存在