Skip to content

live.gift

live.gift represents a live room gift message.

Payload

FieldTypeRequiredDescription
message_idstringYesUnique message identifier for deduplication
room_idstringYesLive room identifier, or empty string when unavailable
giftobjectYesGift information
group_idstringYesGift group identifier, or empty string when unavailable
group_countstringYesGift group count, or empty string when unavailable
repeat_countstringYesRepeat count, or empty string when unavailable
combo_countstringYesCombo count, or empty string when unavailable
repeat_endbooleanYesWhether the repeat or combo sequence has ended
userobjectNoPublic user object

Gift object

FieldTypeRequiredDescription
idstringYesGift identifier
namestringYesGift name, or empty string when unavailable
typenumberYesGift type enum value, or 0 when unavailable
diamond_countnumberYesDiamond value per gift, or 0 when unavailable
image_urlstringYesGift image URL, or empty string when unavailable

Example

json
{
  "type": "EVENT",
  "event": "live.gift",
  "timestamp": 1786010400000,
  "payload": {
    "message_id": "7520000000000000002",
    "room_id": "7520000000000000000",
    "gift": {
      "id": "5655",
      "name": "Rose",
      "type": 1,
      "diamond_count": 1,
      "image_url": "https://example.invalid/gift.png"
    },
    "group_id": "group_001",
    "group_count": "1",
    "repeat_count": "3",
    "combo_count": "3",
    "repeat_end": true,
    "user": {
      "id": "7300000000000000000",
      "nickname": "Viewer",
      "display_id": "viewer_01",
      "avatar_url": "https://example.invalid/avatar.png"
    }
  }
}

Client notes

  • Treat count fields as strings.
  • Tolerate unknown gift type values.
  • Use repeat_end to finalize combo presentation when needed.
  • The user object may be absent.