授权后接口调用
接口:获取用户信息
GET /oauth/resource/userinfo HTTP/1.1
Host: example.com
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvZGF3bi5rZjUuY28iLCJhdWQiOiJodHRwOlwvXC9kYXduLmtmNS5jb1wvY2xpZW50XC9pbmRleCIsImlhdCI6MTUwODIwOTUwOCwibmJmIjoxNTA4MjA5NTY4LCJleHAiOjE1MDgyMTMxMDgsInVpZCI6Ijc0NCIsInNjb3BlcyI6InJlYWQsdGlja2V0OndyaXRlIiwiaWQiOiIxMDAwMDExIn0.BFy35PGyQr0OS7ZxPYFiI_VkiYj7fjkweF1bCIETGkE
正确响应
{
"user_id": 744,
"company_id": 15,
"name": "dawn",
"email": ["89414743@qq.com"],
"phone": ["123456789"],
"landline": [],
"organization_id": 158
}
响应参数
参数 | 说明 |
---|
id | 用户 ID |
company_id | 公司 ID |
organization_id | 组织 ID |
name | 用户昵称 |
email | 用户邮箱列表 |
phone | 用户手机号码列表 |
landline | 用户座机号码列表 |
错误响应
{
"error":832002,
"message":"无效token"
}