Commercials via API and Dashboard be broken

the v3 commercial calling part of Kraken keeps throwing back 400’s with “missing data” when I did pass a length in the post body.

Somethings dun borked your side :frowning:

v5 commercial calling resulted in a 200 and a message of “Starting commercial break. Keep in mind you are still live and not all viewers will receive a commercial”

But no adverts ran…

I’m also getting reports that this is an issue, and logging a lot of 400’s.

Same problem here. Ads sent by API are not shown in twitch dashboard and are not delivered to viewers.

Hi @BarryCarlyon ,

The example request in the docs seem to be working for me.

Can you provide the matching CURL request you are using for V3? Also, make sure to leave out the OAuth token of course! :slight_smile:

The following fail failed

v3 API - failed
v5 API - failed
Chat command - failed
Dashboard command that I am a editor for - failed

    $headers = array(
        'Accept: application/vnd.twitchtv.v5+json',
        'Client-ID: MYCLIENTID',
        'Authorization: OAuth THEKEYOFTHECHANNEL',
        'Content-Type: application/json'

    $url = '';
    $url = '';

    $ch = curl_init($url);
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_TIMEOUT, 3);
    curl_setopt($ch, CURLOPT_POST, true);

    // v3
    curl_setopt($ch, CURLOPT_POSTFIELDS,array(
        'length' => 180

    // v5
    curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(array(
        'length' => 180

    $result = curl_exec($ch);
    $i = curl_getinfo($ch);

I get response of “Starting commercial break. Keep in mind you are still live and not all viewers will receive a commercial. with 180” but the ads will not run.

The only way ads will run is if the channel owner triggers them from his dashboard.

As stated:

  • v3 api failed
  • v5 api failed
  • chat command as an editor failed
  • dashboard button as an editor failed

No ads occured.

I’m getting a “yay” from the API, just nothing is happening.

The API doesn’t get that screenshot from the dashboard, but pressing the button on the dashboard does. Seems that trying to run ads as a editor doesn’t work, nor when authenticated over the API

Hi @BarryCarlyon – thanks for providing your request information, this makes it easier to troubleshoot. :slight_smile:

Just want to confirm for my own understanding that in each of the cases where you mention a failure (v3/v5 api, as well as chat/dashboard via editor), you’re receiving a positive response from the API, yet are not seeing any commercials on your end, correct?

May I also ask on what platform you’re attempting to view the ad (logged-in, Chrome, Safari, mobile, w/ or w/o Adblock)? The reason I ask is that there are instances when the platform decides not to serve an ad to a user for rate-limiting reasons.

Yes, also when I ran the ad from chat via /commercial when I loaded the dashboard the ad button was available to be pressed, instead of locked out as per running the ad from chat.

Today I called a v5 over api, then /commercial via chat then when I loaded the dashboard, the button was still available to press. All three methods all returned success messages, even though attempt 2 and 3 should of thrown “well ads have been called from the v5 API so you can’t call an ad yet, it’s too soon” error

(Undocumented) PubSub, and asking viewers in chat.

When the channel owner presses the Button himself for ads, it has fired PubSub.

I myself cannot see any ads due to being a Prime user and a sub on the channel which has ads for subs off anyway [citation needed]

I’m not though. I keep getting 400 and 401 errors.

With request as POST:{channel}/commercial

with data:

with headers
Content-Type: application/x-www-form-urlencoded
Accept: application/vnd.twitchtv.v3+json
Client-ID: {client-id}
Authorization: OAuth {token}

I would test it further, but there’s no way to test the API’s partner features without partnered accounts.

I’ve been out with the flu (and still limited capacity today), so I want to make sure this is still happening. Sorry for the delay in response!

@moocat, upon receiving a HTTP 401, what is included in the body of the response?

On V3 api I was getting a 40x code and the json message was something along the lines of “you are missing variables/arguments” but all post variables/arguments are optional

Hi all, just wanted to give an update:

The causes for the HTTP 400 (bad requests) and HTTP 401 (Unauthorized) responses have been identified and we’re actively working on pushing these out by the end of day at the latest.

Thanks again for the assistance in identifying and troubleshooting the issue.

Same for v5 API, the dashboard as an editor, and the chat command as a editor? Or just the HTTP 4x codes for v3 API?

The fixes addressing the HTTP 400 and HTTP 401 issues will apply across all versions.

Hi @BarryCarlyon,

At your convenience, please let me know if you are still receiving HTTP 4XX issues. Requests should be successful with or without the optional ‘length’ param.


Well thats the thing I’d switched to v5 and was getting 200’s with a ok message and no ads actually running.

But when we next attempt ads I’ll see what happens!

It’s still not working on v5 API and now my client is angry.

v5 api called
got a OK, from the API saying it will run ads.
Ads didn’t start
He has to reload his dashboard, because the button is red and claims an ad is running, which is isn’t
After he’s reloaded the dash, then he can run the ads.

Looks like I’m not getting any more 4XX errors. Not sure if the commercials are actually running or not though.