用户登录

接口说明

 用户登录,获取令牌

  • URL

      /accessToken
    
  • Method:

    POST

  • 权限:

    low

  • 请求参数

键值 类型 是否必需 备注
phone string 手机号
mail string 邮箱
samId string sam id
password string 密码
type string 登录方式 "mail"/"phone"/"samId"
  • 请求内容示例:
    { 
        "mail": "[email protected]",
        "password": "123",
        "type": "mail"
    } 

  • 返回参数说明
键值 类型 是否必需 备注
id string 用户id
token string 用户令牌,需在http header中设置'Authorization'为该值
  • 返回成功示例:
    {
        "code": 0,
        "id": "3b6a8cc22882901fe1b800d529a81c19",
        "token": "Bearer abc.defg.hijk"

    } 
  • Notes:

  返回的token需要在http header中设置,即:

    Authorization: Bearer abc.defg.hijk