Commercials via API and Dashboard be broken

I looked into this yesterday with @kpa. I got a deep education in ads. :stuck_out_tongue: The 400s were fixed. There are a lot of factors that go into the ad playback process (I had no idea), so the ad is playing if you get back a 200 from the API. If the 400s start again, let us know! :slight_smile:

1 Like

Everything does look okay again! Hurrah!

Regarding v5.

Did it get changed today?

I got as 204 instead of a 200 when calling ads.

This matches v3 but wanted to check and confirm this change?

We migrated our software from v2 to v5, sending commercials didn’t worked with v2 or v3 anymore.
Ads are sent, but the twitch dashboard shows 0 seconds sent despite the number of ads shown is correct (1 or more)

@thormug All versions of this endpoint should be working without issue. We haven’t heard a large outcry about this endpoint not working, so I’m curious if you’re seeing this problem repeatedly.

Probably a problem from our side. The script sending ads was written a looooong time ago by someone who is not working with us anymore. Not even a version number was specified (but seems to be written for v2).
Just refactored all the script for v5, everything is fine, except the problem with the statistics dashboard.

So, I’m still seeing quite a few Bad Request 400 errors coming in, and from what I’ve gathered, those are because the user is not a partner?

The docs say it should return an 422 Unprocessable Entity error in such an event, so is this a doc issue or unintentional?

Personally I like the 400 for non-partners, unintentional or not.

@moocat, this is v5, right? Also, what is the error message that comes along with the 400?

@DallasNChains Looks like the 400 Bad Request is sent when the channel is not detected as live.

Though when the channel is live, it isn’t detecting it as a non-partner, and sending a success with content:
{"Message":"Starting commercial break. Keep in mind you are still live and not all viewers will receive a commercial.","Length":30,"RetryAfter":0}

I looked through the code base yesterday, and it looks like all errors are 400s now instead of 400/422.

Are you saying you always get a success even if it is a non-partner? That’s a bug fo’ sho’ if so.

@DallasNChains Yes, I tested with a non-partner account and still got a success with the body {"Message":"Starting commercial break. Keep in mind you are still live and not all viewers will receive a commercial.","Length":30,"RetryAfter":0}

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