获取当前登录用户的基本信息
/v1/userinfo
接口地址:https://tiupapis.cn/tiup/v1/userinfo
返回格式:JSON
请求方式:GET
请求头部:
Content-Type : application/json
Authorization: {Bearer Token}
返回结果:
{
"uid": "132134",
"name": "用户姓名",
"avatar": "http://tup.cn/xxx/xxx/xx.jpg",
"profiles": [
{
'depid' : '3958',
'depname' : '信息学院',
'roleid' : '1122',
'rolename' : '本科生',
'schoolcode' : 'ruc',
'schoolid': '235',
'schoolname': '中国人民大学',
'sid': '2012200533'
}
]
}
返回字段值 | 字段类型 | 说明 |
---|---|---|
uid | 整形 | 当前用户UID |
name | 字符串 | 用户姓名 |
avatar | 字符串 | 头像 |
profiles | 数组 | 身份信息 |
profiles[0]->sid | 字符串 | 学工号 |