Skip to content

Latest commit

 

History

History
99 lines (75 loc) · 2.53 KB

users.md

File metadata and controls

99 lines (75 loc) · 2.53 KB

Users


These are members of the Twitch community who have a Twitch account. If broadcasting, they can own a stream that they can broadcast on their channel. If mainly viewing, they might follow or subscribe to channels.

Endpoint Description
GET /users/:user Get user object
GET /user Get user object
GET /streams/followed Get list of streams user is following

GET /users/:user

Returns a user object.

Example Request

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

Example Response

{
  "name": "test_user1",
  "created_at": "2011-03-19T15:42:22Z",
  "updated_at": "2012-06-14T00:14:27Z",
  "_links": {
    "self": "https://api.twitch.tv/kraken/users/test_user1"
  },
  "logo": "http://static-cdn.jtvnw.net/jtv_user_pictures/test_user1-profile_image-6947308654ad603f-300x300.jpeg",
  "_id": 21229404,
  "display_name": "test_user1"
}

GET /user

Returns a user object.

Authenticated, required scope: user_read

Example Request

curl -H 'Accept: application/vnd.twitchtv.v2+json' -H 'Authorization: OAuth <access_token>' \
-X GET https://api.twitch.tv/kraken/user

Example Response

{
  "name": "test_user1",
  "created_at": "2011-06-03T17:49:19Z",
  "updated_at": "2012-06-18T17:19:57Z",
  "_links": {
    "self": "https://api.twitch.tv/kraken/users/test_user1"
  },
  "logo": "http://static-cdn.jtvnw.net/jtv_user_pictures/test_user1-profile_image-62e8318af864d6d7-300x300.jpeg",
  "_id": 22761313,
  "display_name": "test_user1",
  "email": "asdf@asdf.com",
  "partnered": true
}

GET /streams/followed

Returns a list of stream objects that the authenticated user is following.

Authenticated, required scope: user_read

Example Request

curl -H 'Accept: application/vnd.twitchtv.v2+json' -H 'Authorization: OAuth <access_token>' \
-X GET https://api.twitch.tv/kraken/streams/followed

Example Response

{
  "_links": {
    "self": "https://api.twitch.tv/kraken/streams/followed?limit=25&offset=0",
    "next": "https://api.twitch.tv/kraken/streams/followed?limit=25&offset=25"
  },
  "streams": [...]
}