15.2.2 获取艺人聊天资料【已开发,待登录态和订阅数据联调】

GET /tieup/api/v1/me/artists/{artist_id}/chat-profile
Authorization: Bearer <access_token>

路径参数:

参数 类型 必填 说明
artist_id integer 正常公开艺人 ID;不要求当前存在订阅关系

响应字段:

字段 类型 说明
artist_id integer 艺人 ID
artist_avatar string 艺人头像,优先读取艺人档案头像并补齐资源域名
artist_nickname string 艺人昵称,优先读取艺名,艺名为空时回退绑定用户昵称
artist_gender integer 艺人绑定用户性别:0=未知,1=男,2=女
companion_days integer 当前连续订阅陪伴的完整天数;当前无有效订阅时为 0
remaining_count integer 当前粉丝今日还可向该艺人发送的消息条数,最低为 0
max_chars integer 粉丝单条文字消息最大字符数,按去除首尾空白后的 UTF-8 文本计算
chat_background_url string 当前粉丝为该艺人设置的专属聊天背景;未设置时为空字符串

完整响应示例:

{
  "code": 200,
  "message": "成功",
  "data": {
    "artist_id": 20001,
    "artist_avatar": "https://cdn.example.com/artist.png",
    "artist_nickname": "示例艺人",
    "artist_gender": 2,
    "companion_days": 37,
    "remaining_count": 2,
    "max_chars": 30,
    "chat_background_url": "https://cdn.example.com/chat/background.png"
  }
}

连续陪伴规则:从覆盖当前时间的有效订阅开始向前检查;上一段 expires_at 大于或等于当前连续段 started_at 时视为相接或重叠并继续合并,遇到断档立即停止,状态 3=已取消 的订阅段不参与合并。最终按当前时间减去连续区间最早开始时间,以完整 86400 秒向下取整。历史订阅存在但当前已经断订时返回 0

私信额度规则:按当前粉丝渠道读取后台基础配置 fan_to_artist_daily_limitfan_to_artist_text_max_chars,默认分别为 330remaining_count 等于每日上限减去当前粉丝今日向该艺人已占用额度的消息数,最低返回 0;按北京时间自然日和“当前粉丝 + 当前艺人”维度统计,计入发送中、发送成功及成功后撤回的消息,明确发送失败的消息不占额度。该字段是查询时快照,实际发送仍以发送接口事务内的并发校验结果为准。