Skip to content

Unable to support badge images in application. Chat Message Webhook Payload does not provide urls for badges. #336

@NiceShyGuy

Description

@NiceShyGuy

Is your feature request related to a problem? Please describe.
Unable to support badge images in application. Chat Message Webhook Payload does not provide urls for badges.

Describe the solution you'd like
Add 2 endpoints.

1st endpoint
Get Channel Chat Badges
Example Response from Twitch endpoint

{
  "data": [
    {
      "set_id": "bits",
      "versions": [
        {
          "id": "1",
          "image_url_1x": "https://static-cdn.jtvnw.net/badges/v1/743a0f3b-84b3-450b-96a0-503d7f4a9764/1",
          "image_url_2x": "https://static-cdn.jtvnw.net/badges/v1/743a0f3b-84b3-450b-96a0-503d7f4a9764/2",
          "image_url_4x": "https://static-cdn.jtvnw.net/badges/v1/743a0f3b-84b3-450b-96a0-503d7f4a9764/3",
          "title": "cheer 1",
          "description": "cheer 1"
          "click_action": "visit_url",
          "click_url": "https://bits.twitch.tv"
        }
      ]
    },
    {
      "set_id": "subscriber",
      "versions": [
        {
          "id": "0",
          "image_url_1x": "https://static-cdn.jtvnw.net/badges/v1/eb4a8a4c-eacd-4f5e-b9f2-394348310442/1",
          "image_url_2x": "https://static-cdn.jtvnw.net/badges/v1/eb4a8a4c-eacd-4f5e-b9f2-394348310442/2",
          "image_url_4x": "https://static-cdn.jtvnw.net/badges/v1/eb4a8a4c-eacd-4f5e-b9f2-394348310442/3",
          "title": "Subscriber",
          "description": "Subscriber",
          "click_action": "subscribe_to_channel",
          "click_url": null
        },
      ]
    }
  ]
}

2nd endpoint
Get Global Chat Badges
Example Response from Twitch endpoint

{
  "data": [
    ...
    {
      "set_id": "vip",
      "versions": [
        {
          "id": "1",
          "image_url_1x": "https://static-cdn.jtvnw.net/badges/v1/b817aba4-fad8-49e2-b88a-7cc744dfa6ec/1",
          "image_url_2x": "https://static-cdn.jtvnw.net/badges/v1/b817aba4-fad8-49e2-b88a-7cc744dfa6ec/2",
          "image_url_4x": "https://static-cdn.jtvnw.net/badges/v1/b817aba4-fad8-49e2-b88a-7cc744dfa6ec/3",
          "title": "VIP",
          "description": "VIP",
          "click_action": "visit_url",
          "click_url": "https://help.twitch.tv/customer/en/portal/articles/659115-twitch-chat-badges-guide"
        }
      ]
    },
    ...
  ]
}

Describe alternatives you've considered
For now i have implemented a temporary text-based badge fallback since i can not get images of chat badges from the kick API. i need to get a list of all global chat badge and channel badge images so i can match the badges to the user when i receive a message from kick which only has badge text, type, and count.

alternatively you could just add a url here in the chat message payload.

Chat Message

"badges": [
        {
          "text": "Moderator",
          "type": "moderator",
        },
        {
          "text": "Sub Gifter",
          "type": "sub_gifter",
          "count": 5,
        },
        {
          "text": "Subscriber",
          "type": "subscriber",
          "count": 3,
        }
      ]

Additional context
attached image, first message is from twitch where i can support badges, second is from kick using the text badge fallback since i can't get badge images from the kick api.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions