How to Deep link to a stream (using new Twitch api)

Hi,

I’m developing a mobile application, and I display a list of Twitch streams in it.
I’m using the “New Twitch API”: https://dev.twitch.tv/docs/api to request a list of streams using the Get Streams endpoint (https://dev.twitch.tv/docs/api/reference#get-streams), and when the user clicks on one of the streams I want to use a deep link to navigate the user to that stream in the twitch app.
My problem is that deep linking requires a “channel name” but this information is missing in the Get Streams API, and I cannot see any other endpoints that gives me the channel name.

How to get the channel name? Or how to deep link with a stream ID?

channel name = user_name

They are different names for the same thing.

as per the example

{
  "data": [
    {
      "id": "26007494656",
      "user_id": "23161357",
      "user_name": "LIRIK",
      "game_id": "417752",
      "type": "live",
      "title": "Hey Guys, It's Monday - Twitter: @Lirik",
      "viewer_count": 32575,
      "started_at": "2017-08-14T16:08:32Z",
      "language": "en",
      "thumbnail_url": "https://static-cdn.jtvnw.net/previews-ttv/live_user_lirik-{width}x{height}.jpg"
    },
       "tag_ids":  [
          "6ea6bca4-4712-4ab9-a906-e3336a9d8039"
        ]
    ...
  ],
  "pagination": {
    "cursor": "eyJiIjpudWxsLCJhIjp7Ik9mZnNldCI6MjB9fQ=="
  }
}

The username LIRIK which is also the channel name for linking with

You can also use

To lookup the name by user_id

1 Like

And it works, thank you for this super fast response!

(By the way this should be mentioned in the Deep Linking documentation page)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.