开源中国 API
  1. 个人信息
开源中国 API
  • OSCHINA 开放平台Beta
  • 认证接口
    • oauth2_authorize
      GET
    • oauth2_token
      POST
  • 个人信息
    • openapi_user
      POST
    • user_information
      POST
    • my_information
      POST
    • portrait_update
      POST
    • friends_list
      POST
    • active_list
      POST
    • update_user_relation
      POST
  • 新闻
    • news_list
      POST
    • /action/openapi/news_detail
      POST
  • 帖子
    • post_list
      POST
    • post_pub
      POST
    • post_detail
      POST
  • 动弹
    • tweet_list
      POST
    • tweet_detail
      POST
    • tweet_pub
      POST
    • tweet_delete
      POST
  • 博客
    • blog_pub
      POST
    • blog_list
      POST
    • blog_recommend_list
      POST
    • blog_detail
      POST
    • user_blog_list
      POST
    • blog_catalog_list
      POST
  • 评论
    • blog_comment_list
    • blog_comment_pub
    • blog_comment_reply
    • user_blog_delete
    • comment_list
    • comment_pub
    • comment_reply
    • comment_delete
  • 收藏
    • favorite_list
    • favorite_add
    • favorite_remove
  • 软件
    • project_detail
    • project_catalog_list
    • project_list
    • project_tag_list
  • 私信
    • message_list
    • message_delete
  • 搜索
    • search_list
  • 通知
    • user_notice
    • clear_notice
  1. 个人信息

user_information

POST
/action/openapi/user_information
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://www.oschina.net/action/openapi/user_information' \
--header 'Content-Type: application/json' \
--data-raw '{
    "access_token": "string",
    "user": "string",
    "friend": "string",
    "friend_name": "string",
    "dataType": "string"
}'
响应示例响应示例
{
  "uid": 20,
  "name": "xxx",
  "ident": "xxx",
  "gender": 1,
  "relation": 3,
  "province": "上海",
  "city": "闵行",
  "platforms": [
    "Java EE",
    "PHP",
    ".NET/C#",
    "JavaScript",
    "Delphi/Pascal"
  ],
  "expertise": [
    "WEB开发",
    "服务器端开发",
    "DBA/数据库"
  ],
  "joinTime": "2008-09-18 09:17:15.0",
  "lastLoginTime": "2012-03-13 15:22:58.0",
  "portrait": "http://www.oschina.net/uploads/user/0/20_50.jpg",
  "notice": {
    "replyCount": 0,
    "msgCount": 0,
    "fansCount": 0,
    "referCount": 0
  }
}

请求参数

Body 参数application/json
access_token
string 
必需
oauth2_token获取的access_token
user
string 
查询用户id
必需
friend
string 
必需
被查询用户id(friend和friend_name必须存在一个)
friend_name
string 
可选
被查询用户ident或名称
dataType
string 
必需
返回值类型['json'|'jsonp'|'xml']
示例

返回响应

🟢200成功
application/json
Body
uid
integer 
被查询用户id
必需
name
string 
用户名称
必需
ident
string 
用户Ident
必需
gender
integer 
必需
性别:1-男,2-女
relation
integer 
必需
关注情况:1-已关注(对方未关注我)2-相互关注 3-未关注
province
string 
省份
必需
city
string 
城市
必需
platforms
array[string]
开发平台
必需
expertise
array[string]
专长领域
必需
joinTime
string 
加入时间
必需
lastLoginTime
string 
最近登录时间
必需
portrait
string 
头像
必需
notice
object 
必需
replyCount
integer 
未读评论数
必需
msgCount
integer 
未读私信数
必需
fansCount
integer 
新增粉丝数
必需
referCount
integer 
未读@我数
必需
修改于 2022-08-22 04:10:13
上一页
openapi_user
下一页
my_information
Built with