Commercial API endpoint issues

We are using the API endpoint to do some of our commercial automation. For some reason it seems to fail 9/10 times we POST to it.

Is there currently any known issues on this endpoint?

Thanks in advance.

My only request of the day operated ok.

Are you making sure to post a length correctly in the post fields and not calling the endpoint too quickly?

Did you check the response you are getting for a HTTP Code and or Error Response message?

As in, what is the definition of fail?

Yeah seems like we are doing it correctly since the first ad always works, and a few others work out fine, but at random intervals.

We always wait a minimum of 8 minutes before offering the chat to claim an action and watch the ad (it’s for a TwitchPlays game).

We haven’t had this issue in the development version so we don’t have debugging in our production build, We are getting it sorted out now, so we can see what the HTTP error is (I’ll post back as soon as I know this).

Was just wondering if anyone experienced similar issues with the API.

Ok, so after some more testing, the issue ended up getting weirder. We started getting back HTTP 401 status for same calls that 10 minutes before that returned 204 No Content (so ok ad should play). This was going on the whole day yesterday, and the issue seems to have resolved itself on it’s own.

Today, all of the HTTP responses we get are 204, so technically it should be working fine, but only about 2 people see the ad. I even tested it myself to make sure it wasn’t just people using AdBlock, and both as logged out and my bot account (since I have turbo on my main) I saw no ad play, even though the API responded with the expected 204.

Not all uses will be shown a ad generally speaking.

There are regionally variations (and A/B testing(.

if you getting a 204, then you should assume that Twitch will do as instructed and play a ad to all people watching were the “rules” governing who gets shown what ad allow a ad to be played.

it’s entirely likely if you are running a LOT of ads, that Twitch ran out of eligible ads to show people [citation needed]

Cool, thanks Barry, yeah I guess because of the way our TwitchPlays game works, it is running more ads than a regular streamer would.

We’ll just assume that it’s all working now, and that those 401s were just a random hickup in the API

Also January is historically the lowest month for ad sales so the might not be able to full every request:

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