Skip to content

使用须知

1. Base Url

环境地址
开发环境https://openapi.test.fastmoss.com
生产环境https://openapi.fastmoss.com

2. request method

所有接口请求方式均为:POST

3. 公共参数

除了获取、刷新access_token外,其他接口都需要通过URL传递以下参数:

参数名类型说明
client_idstring客户端id
access_tokenstringaccess_token
timestamptimestamp[integer]时间戳
signstring签名
signature_versionstring签名

example

bash
curl 'https://openapi.test.fastmoss.com/test?client_id=xxx&access_token=xxx&timestamp=xxx&sign=xxx&signature_version=2'

4. 返回结果

所有接口返回结果均为json object格式。data字段为具体数据,是json object

参数名类型说明
codeinteger状态码
msgstring信息
dataobject数据
request_idstring请求id
timestamptimestamp[integer]服务器时间戳

example

json
{
    "code": 0,
    "msg": "success",
    "data": {
        "xxx": "xxx"
    },
    "request_id": "xxxx",
    "timestamp": 1690351112
}

5. Http Status Codecode的关系

  • http status codecode 不冲突
  • code 是具体业务的状态码
  • 应首先检查http status code, 再检查code
  • http status code 为200时 且 code为0时, 表示成功

code错误码说明

状态码类型描述
0无异常成功
10001参数异常参数不符合要求
20001数据异常资源不存在
30001权限异常无访问权限
30002权限异常数据条数限制
30003权限异常访问次数限制
40001服务异常服务异常