Skip to content

Latest commit

 

History

History
129 lines (99 loc) · 2.9 KB

chat.md

File metadata and controls

129 lines (99 loc) · 2.9 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/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.v2+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.v2+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/emoticons ** DEPRECATED **

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

[DEPRECATED] - Emoticon sets are no longer tied to specific channels, so information returned from this endpoint is somewhat useless.

Example Request

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

Example Response

{
  "emoticons": [
    {
      "regex": "MeoW",
      "url": "http://static-cdn.jtvnw.net/jtv_user_pictures/chansub-test_user1-emoticon-30bc1522fa392415-28x32.png",
      "height": 32,
      "width": 28,
      "subscriber_only": true
    },
    {
      "regex": "\\&lt\\;3",
      "url": "http://static-cdn.jtvnw.net/jtv_user_pictures/chansub-global-emoticon-67cde8d0b7916e57-24x18.png",
      "height":18,
      "width":24,
      "subscriber_only": false
    }
    ...
  ],

  "_links": {
   "self": "https://api.twitch.tv/kraken/chat/test_user1/emoticons"
  }
}

Embedding

See here for embedding.

Connecting to IRC

See here for connecting to IRC.