Streams Webhooks Missing Data

I’m just posting here to see if this is typical. Below is a sample of a Streams Webhook Event being sent to me.

{'community_ids': ['831ccb45-e159-4873-a61b-74693bdc5756', '9d175334-ccdd-4da8-a3aa-d9631f95610e', 'fb4e9a1c-176b-494a-85c4-c1168088c680'], 'game_id': '509670', 'id': '31607784432', 'language': 'en', 'started_at': '2018-12-09T20:40:53Z', 'tag_ids': None, 'thumbnail_url': 'https://static-cdn.jtvnw.net/previews-ttv/live_user_codespent-{width}x{height}.jpg', 'title': '404 NOTHING HERE APPLICATION TESTING ', 'type': 'live', 'user_id': '149133784', 'user_name': '', 'viewer_count': 0}

You can see that user_name is ' ', and in the thumbnail_url are the variables for height and width as a string which makes this URL unusable.

This isn’t a consistent thing, though. I’ve only used myself as a test streamer and periodically I am getting good data that allows my application to proceed, but once in a while I’m getting a NoneType exception because this is what’s being given to me.

I just recently converted over to webhooks, so just looking to get some insight on if this is a known issue now, and if I should hold off on using webhooks for a while? I didn’t see anything regarding it on the Helix roadmap.

Thats correct.

Replace {width} and {height} in the string with the values you want. its a “template” string. You need to swap this strings for the size of image you want.

Not sure whats up with a blank user_name I’ll punt this to someone via the Twitch App Dev Server.

1 Like

I suspected {height}x{width} could have been intentional, and that makes sense, just wanted to bring attention to it in case. :slight_smile:

Awesome, thank you. For now I’ll just get the name by the user_id until I hear back.

When a webhook is triggered, we make an API call to Helix and copy-paste the response into the webhook notification payload. So any fields that are returned by Helix are sent directly to you.

If a field was missing from the notification, we need to look into why the Helix API call didn’t include it :thinking:

1 Like
{
  "data": [
    {
      "id": "31613863264",
      "user_id": "149133784",
      "user_name": "",
      "game_id": "509670",
      "community_ids": [
        "831ccb45-e159-4873-a61b-74693bdc5756",
        "9d175334-ccdd-4da8-a3aa-d9631f95610e",
        "fb4e9a1c-176b-494a-85c4-c1168088c680"
      ],
      "type": "live",
      "title": "404 NOTHING HERE APPLICATION TESTING ",
      "viewer_count": 0,
      "started_at": "2018-12-10T05:52:10Z",
      "language": "en",
      "thumbnail_url": "https://static-cdn.jtvnw.net/previews-ttv/live_user_codespent-{width}x{height}.jpg",
      "tag_ids": null
    }
  ],
  "pagination": {
    "cursor": "eyJiIjpudWxsLCJhIjp7Ik9mZnNldCI6MX19"
  }
}

Yupp, the user_name is missing there as well. Below is a friend of mine,

{
  "data": [
    {
      "id": "67961343",
      "login": "xj0kerx",
      "display_name": "xJ0KERx",
      "type": "",
      "broadcaster_type": "partner",
      "description": "I'm just a guy just looking to have fun with friends playing video games.",
      "profile_image_url": "https://static-cdn.jtvnw.net/jtv_user_pictures/01e05ed8-3dda-42b2-bcce-3d453adf82cc-profile_image-300x300.png",
      "offline_image_url": "https://static-cdn.jtvnw.net/jtv_user_pictures/dead6b2f77eb2f56-channel_offline_image-1920x1080.jpeg",
      "view_count": 263458
    }
  ]
}

Which his doesn’t even look consistent to the structure of my account. There’s about a year difference in account creation, but his type is missing. I tried comparing to 5 other streamers closer to my account creation again as well, but they look like xJ0kerx’s sample above so I can’t offer many test cases.

Curious why my account didn’t get restructured to be uniform though. :thinking:

hey, have you resolved the issue? im having same problem:

{"data":[{"community_ids":["fd0eab99-832a-4d7e-8cc0-04d73deb2e54"],"game_id":"509658","id":"31759846032","language":"en","started_at":"2018-12-20T16:56:57Z","tag_ids":null,"thumbnail_url":"https://static-cdn.jtvnw.net/previews-ttv/live_user_forsen-{width}x{height}.jpg","title":"@forsen, Games and shit!","type":"live","user_id":"22484632","user_name":"","viewer_count":0}]}name: title: @forsen, Games and shit! game: Just Chatting

Twitch is giving us data, so it’s not that there’s a problem on our end, but an issue on their’s. Not that I don’t have faith in Twitch, but when I find a vendor has an issue I always assume it’ll never be fixed, just for due diligence.

You’ll want to just favor user IDs more than usernames, and use the user ID to get the username later. This is redundant and sucks to have to do, but ultimately it’s all we can do until we hear back. :slight_smile:

1 Like

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