Intermittent Error 400 (Invalid Cursor) from Helix Streams API

Around 12:30 PST I began seeing errors with pagination on the Helix Streams endpoint. Here is the response: Body: {"error":"Bad Request","status":400,"message":"invalid cursor"}

Here was the chain of pagination before hitting the error:

https://api.twitch.tv/helix/streams?first=100&type=all
https://api.twitch.tv/helix/streams?first=100&type=all&after=ZXlKeklqbzVOakl5Tmk0MU5Ua3hNemszT1RreU1pd2laQ0k2Wm1Gc2MyVXNJblFpT25SeWRXVjkgZXlKeklqbzFNek0zTGpRNE1qSTFOakEwTWprME5pd2laQ0k2Wm1Gc2MyVXNJblFpT25SeWRXVjk
https://api.twitch.tv/helix/streams?first=100&type=all&after=ZXlKeklqbzFNekkxTGpnNE1EVTNOelV4TXpJeU1Td2laQ0k2Wm1Gc2MyVXNJblFpT25SeWRXVjkgZXlKeklqb3lOemd6TGpneE5EYzVNVFkwTkRRM056TXNJbVFpT21aaGJITmxMQ0owSWpwMGNuVmxmUT09
https://api.twitch.tv/helix/streams?first=100&type=all&after=ZXlKeklqb3lOelk1TGpjMU5UVTVPVGt4TVRjek16VXNJbVFpT21aaGJITmxMQ0owSWpwMGNuVmxmUT09IGV5SnpJam94T0RRMkxqWXlNVEU0TlRFMU1EWTNNRGNzSW1RaU9tWmhiSE5sTENKMElqcDBjblZsZlE9PQ
https://api.twitch.tv/helix/streams?first=100&type=all&after=ZXlKeklqb3hPRE00TGpReE9UVTVORGswTnpneE1qRXNJbVFpT21aaGJITmxMQ0owSWpwMGNuVmxmUT09IGV5SnpJam94TXpRMUxqSTJPRFV3TmpZMk5UZ3pPVFlzSW1RaU9tWmhiSE5sTENKMElqcDBjblZsZlE9PQ
https://api.twitch.tv/helix/streams?first=100&type=all&after=ZXlKeklqb3hNelF6TGpZM01qY3pPRE15T0RVc0ltUWlPbVpoYkhObExDSjBJanAwY25WbGZRPT0gZXlKeklqb3hNREUzTGpBM016a3lNell5T1RVMU5pd2laQ0k2Wm1Gc2MyVXNJblFpT25SeWRXVjk
https://api.twitch.tv/helix/streams?first=100&type=all&after=ZXlKeklqb3hNREUwTGpjNE1qVTFORGt4TXpRNU5EUXNJbVFpT21aaGJITmxMQ0owSWpwMGNuVmxmUT09IGV5SnpJam8zTnprdU9EWTROak0xTkRVek5UUTVMQ0prSWpwbVlXeHpaU3dpZENJNmRISjFaWDA9
3 Likes

I am facing the same issue. It was working fine yesterday, but today I get this error very often.

Happens around 1 in 40 calls or so.

Im getting a ton of these, any response from Twitch?

Getting this too. It’s my first time using the Helix Streams API though. Has this always been an issue or is this a new issue that just happens to have emerged as I got started?

As a workaround, you can add a retry and it works.

I don’t know what programming language you’re using, but I added a check in Python:

if response.ok:
        # continue with your programme
else:
        # retry

Normally it works after the first retry, but sometimes it takes 2 or 3 retries to work.

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