[TOC=2,3]
* * * * *
* * * * *
* * * * *
### 获取用户唯一标识OpenID
+++
get:ucenter/resources/getOpenID
*string:access_token#在上步中获取到的access token。
<<<
success
返回示例:
1)如果成功返回,即可在返回包中获取到openid。 如:
{
status: 200,
openid: "YOUR_OPENID"
}
<<<
error1
返回示例:
{
status: 100000,
message: "缺少参数"
}
<<<
error2
返回示例:
{
status: 100001,
message: "access token错误或者失效"
}
<<<
+++
* * * * *
* * * * *
* * * * *
### 访问用户资料
+++
get:ucenter/resources/getUserInfo
*string:access_token#在上步中获取到的access token。
*string:client_secret#申请平台授权登录成功后,分配给应用的appkey。
*string:openid#应用中唯一对应用户身份的标识。
<<<
success
返回示例:
1)如果成功返回,即可在返回包中获取到openid。 如:
{
"status": 200,
"info": {
"id": "116",
"username": "yang",
"email": "13xxxxx76@qq.com",
"mobile": null,
"reg_time": "1473832083",
"reg_ip": "2093529902",
"last_login_time": "1493259124",
"last_login_ip": "2130706433",
"update_time": "1487658234",
"status": "1",
"type": "2",
"uid": "116",
"nickname": "yang",
"sex": "0",
"birthday": "0000-00-00",
"qq": "",
"avatar": "http://account.fo.com/Public/images/default_avatar_256_256.jpg"
}
}
<<<
error1
返回示例:
{
status: 100000,
message: "缺少参数"
}
<<<
error2
返回示例:
{
status: 100001,
message: "access token错误或者失效"
}
<<<
+++