Skip to content

System Message

Authentication

参考接入 BytePower

获取当前用户未读系统消息

Method & Path

  • GET {domain}/bp/system_message
  • GET {domain}/bp/server/user/{user_id}/system_message

接口功能: 获取用户当前未读系统消息

Request

Response

  • HTTP 状态码:200
json
{
  "messages": [
    {
      "message_id": "MESEBK6SLSGOPMEX",
      "subject": "subject_update",
      "body": "body_update",
      "attachment_path": "attachment_path_update",
      "strategy_id": "STREBLBQRHNLX6AR",
      "recipient_scope": "to_user",
      "effective_time": "2023-12-01T12:34:56Z",
      "expired_time": "2023-12-10T12:34:56Z",
      "status": "unread"
    },
    {
      "message_id": "MESEBK6SLSGOPMEX",
      "subject": "subject_update",
      "body": "body_update",
      "attachment_path": "attachment_path_update",
      "strategy_id": "STREBLBPCZZT2GC7",
      "recipient_scope": "to_all",
      "effective_time": "2023-12-01T12:34:56Z",
      "expired_time": "2023-12-10T12:34:56Z",
      "status": "unread"
    }
  ]
}
  • HTTP 状态码:4xx
json
{
  "error": {
    "error_type": "invalid_parameter",
    "message": "xxxxx"
  }
}

error_type:

  • item_not_found(找不到条目)
  • config_invalid (console 配置问题)

读取系统消息

Method & Path

  • POST {domain}/bp/system_message/read
  • POST {domain}/bp/server/user/{user_id}/system_message/read

接口功能: 客户端上报用户已读的系统消息

Request

  • content-type: "application/json"
ParametersTypeRequiredDesc
strategy_idstringtrue策略 ID
json
{
  "strategy_id": "<id_value>"
}

Response

  • HTTP 状态码:200

HTTP 状态码:4xx 描述:错误 响应示例:

json
{
  "error": {
    "error_type": "invalid_parameter",
    "message": "xxxxx"
  }
}

error_type:

  • invalid_parameter(无效参数)
  • config_invalid (console 配置问题)

京ICP备19011570号-2