Skip to content

Latest commit

 

History

History
139 lines (112 loc) · 3.64 KB

chat.md

File metadata and controls

139 lines (112 loc) · 3.64 KB

Chat

Chat is where Twitch users can interact with each other while watching a stream.

Endpoint Description
GET /chat/:channel Get links object to other chat endpoints
GET /chat/:channel/badges Get chat badges for channel
GET /chat/emoticons Get list of every emoticon object

GET /chat/:channel

Returns a links object to all other chat endpoints.

Example Request

curl -H 'Accept: application/vnd.twitchtv.v3+json' \
-X GET https://api.twitch.tv/kraken/chat/kraken_test_user

Example Response

{
  "_links": {
    "self": "https://api.twitch.tv/kraken/chat/kraken_test_user",
    "emoticons":"https://api.twitch.tv/kraken/chat/kraken_test_user/emoticons",
    "badges": "https://api.twitch.tv/kraken/chat/kraken_test_user/badges"
  }
}

GET /chat/emoticons

Returns a list of all emoticon objects for Twitch.

Example Request

curl -H 'Accept: application/vnd.twitchtv.v3+json' \
-X GET https://api.twitch.tv/kraken/chat/emoticons

Example Response

{
  "_links": {
    "self": "https://api.twitch.tv/kraken/chat/emoticons"
  },
  "emoticons": [
    {
      "regex": "\:-?\(",
      "images": [
        {
          "emoticon_set": null,
          "height": 18,
          "width": 24,
          "url": "http://static-cdn.jtvnw.net/jtv_user_pictures/chansub-global-emoticon-d570c4b3b8d8fc4d-24x18.png"
        },
        {
          "emoticon_set": 33,
          "height": 18,
          "width": 21,
          "url": "http://static-cdn.jtvnw.net/jtv_user_pictures/chansub-global-emoticon-c41c5c6c88f481cd-21x18.png"
        }
      ]
    },
    ...
  ]
}

GET /chat/:channel/badges

Returns a list of chat badges that can be used in the :channel's chat.

Example Request

curl -H 'Accept: application/vnd.twitchtv.v3+json' \
-X GET https://api.twitch.tv/kraken/chat/test_user1/badges

Example Response

{
  "global_mod": {
    "alpha": "http://chat-badges.s3.amazonaws.com/globalmod-alpha.png",
    "image": "http://chat-badges.s3.amazonaws.com/globalmod.png",
    "svg": "http://chat-badges.s3.amazonaws.com/globalmod.svg"
  },
  "admin": {
    "alpha": "http://chat-badges.s3.amazonaws.com/admin-alpha.png",
    "image": "http://chat-badges.s3.amazonaws.com/admin.png",
    "svg": "http://chat-badges.s3.amazonaws.com/admin.svg"
  },
  "broadcaster": {
    "alpha": "http://chat-badges.s3.amazonaws.com/broadcaster-alpha.png",
    "image": "http://chat-badges.s3.amazonaws.com/broadcaster.png",
    "svg": "http://chat-badges.s3.amazonaws.com/broadcaster.svg"
  },
  "mod": {
    "alpha": "http://chat-badges.s3.amazonaws.com/mod-alpha.png",
    "image": "http://chat-badges.s3.amazonaws.com/mod.png",
    "svg": "http://chat-badges.s3.amazonaws.com/mod.svg"
  },
  "staff": {
    "alpha": "http://chat-badges.s3.amazonaws.com/staff-alpha.png",
    "image": "http://chat-badges.s3.amazonaws.com/staff.png",
    "svg": "http://chat-badges.s3.amazonaws.com/staff.svg"
  },
  "turbo": {
    "alpha": "http://chat-badges.s3.amazonaws.com/turbo-alpha.png",
    "image": "http://chat-badges.s3.amazonaws.com/turbo.png",
    "svg": "http://chat-badges.s3.amazonaws.com/turbo.svg"
  },
  "subscriber": null,
  "_links": {
    "self": "https://api.twitch.tv/kraken/chat/test_user1/badges"
  }
}

Embedding

See here for embedding.

Connecting to IRC

See here for connecting to IRC.