开源中国 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
      POST
    • message_delete
      POST
  • 搜索
    • search_list
  • 通知
    • user_notice
    • clear_notice
  1. 私信

message_list

POST
/action/openapi/message_list
获取私信列表
是否需要登录
否
访问授权限制
暂无
授权范围(scope)
访问私信信息
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://www.oschina.net/action/openapi/message_list' \
--header 'Content-Type: application/json' \
--data-raw '{
    "page/pageIndex": 0,
    "pageSize": 0,
    "access_token": "string",
    "dataType": "string"
}'
响应示例响应示例
{
    "notice": {
        "replyCount": 0,
        "msgCount": 0,
        "fansCount": 0,
        "referCount": 0
    },
    "messageList": [
        {
            "content": "你好啊",
            "senderid": 253479,
            "sender": "张艺辰",
            "friendid": 253469,
            "id": 898973,
            "pubDate": "2013-10-10 15:55:24.0",
            "friendname": "test33",
            "messageCount": 2,
            "portrait": "http://static.oschina.org/uploads/user/126/253469_50.jpg?t=1366257509000"
        }
    ]
}

请求参数

Body 参数application/json
page/pageIndex
integer 
页数
必需
pageSize
integer 
每页条数
必需
access_token
string 
必需
oauth2_token获取的access_token
dataType
string 
必需
返回数据类型['json'|'jsonp'|'xml']
示例

返回响应

🟢200成功
application/json
Body
notice
object 
必需
replyCount
integer 
未读评论数
必需
msgCount
integer 
未读私信数
必需
fansCount
integer 
新增粉丝数
必需
referCount
integer 
未读@我数
必需
messageList
array [object {10}] 
必需
content
string 
私信内容
可选
senderid
integer 
发送者ID
可选
sender
string 
可选
friendid
integer 
接收人ID
可选
id
integer 
私信id
可选
pubDate
string 
私信发送日期
可选
friendname
string 
接收人用户名
可选
messageCount
integer 
来往私信数
可选
portrait
string 
私信人头像
可选
sendername
string 
发送者用户名
必需
修改于 2022-08-22 06:02:55
上一页
project_tag_list
下一页
message_delete
Built with