Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search Channels thumbnail_url returns profile picture (channel logo) #573

Closed
dblachut-adb opened this issue Feb 16, 2022 · 4 comments
Closed
Labels
product: api API endpoints in the "helix" namespace

Comments

@dblachut-adb
Copy link

Brief description
When searching for channels https://dev.twitch.tv/docs/api/reference#search-channels thumbnail_url property documentation is all wrong:

Thumbnail URL of the stream. All image URLs have variable width and height. You can replace {width} and {height} with any values to get that size image.

This is not a thumbnail of the stream but profile picture and does not have variable width and height.
XQC example: default 300x300 works 100x100 does not work (403).

How to reproduce
Search for channels using helix API.

Expected behavior

  • thumbnail_url returns thumbnail of live or latest stream
    • additional property channel_logo or profile_picture is introduced for currently returned image
  • thumbnail_url returns thumbnail of live stream if the channel is live and profile picture otherwise

Twitch cli example

twitch api get 'search/channels?query=cohhcarnage'
{
  "data": [
    {
      "broadcaster_language": "en",
      "broadcaster_login": "cohhcarnage",
      "display_name": "CohhCarnage",
      "game_id": "490100",
      "game_name": "LOST ARK",
      "id": "26610234",
      "is_live": true,
      "started_at": "2022-02-16T12:24:34Z",
      "tag_ids": [
        "c2542d6d-cd10-4532-919b-3d19f30a768b",
        "6ea6bca4-4712-4ab9-a906-e3336a9d8039",
        "96b6073f-450d-4248-8ed4-988e28f3f759",
        "54b544af-2d0e-4d17-a653-78e3f6fc1fc8",
        "eaba0ad7-c4e1-4878-b37f-01308dbb65c8",
        "1277e554-f8c9-4795-a475-27418d7bd111"
      ],
      "thumbnail_url": "https://static-cdn.jtvnw.net/jtv_user_pictures/e3a58ce0-46ea-4558-8bb0-7a967c1d621c-profile_image-300x300.png",
      "title": "[!DROPS] - !MERCH until 2/27! - Lost Ark (Ladon / Artillerist) - HORIZON: FORBIDDEN WEST SOON - !LAThoughts - YouTube.com/CohhDaily - !PC"
    },
    {
      "broadcaster_language": "en",
      "broadcaster_login": "cohhcarnage1",
      "display_name": "CohhCarnage1",
      "game_id": "0",
      "game_name": "",
      "id": "80339555",
      "is_live": false,
      "started_at": "",
      "tag_ids": [],
      "thumbnail_url": "https://static-cdn.jtvnw.net/user-default-pictures-uv/ead5c8b2-a4c9-4724-b1dd-9f00b46cbd3d-profile_image-300x300.png",
      "title": ""
    },
    [...]

Additional context or questions
Is this a documentation bug? I would really like to have both profile picture and stream thumbnail in response.

@dblachut-adb dblachut-adb added the product: api API endpoints in the "helix" namespace label Feb 16, 2022
@scott-a-white
Copy link

Thanks for reporting the issue. Fixed the documentation portion of this issue: https://dev.twitch.tv/docs/api/reference#search-channels.

Please use UserVoice to request your product feature.

@dblachut-adb
Copy link
Author

Thanks, why is it called a thumbnail as it is not a reduced-size versions of stream? I think it should rather be called channel_logo or profile_picture. If backward compatibility is your concern then you can probably add it and leave thumbnail_url for some time but delete it from the doc.

BTW is there any way to get live stream thumbnail for given channel?

@scott-a-white
Copy link

Have you tried https://dev.twitch.tv/docs/api/reference#get-streams?

@dblachut-adb
Copy link
Author

Looks like this does the job, thanks. So I need to search for channel and once I obtain it I need to get the thumbnail of live stream through separate request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product: api API endpoints in the "helix" namespace
Projects
None yet
Development

No branches or pull requests

2 participants