Specifying optional parameters 'get videos' results in 503 'Service Unavailable'

I’ve done some Googling and have not come across this issue yet. I’ve looked up the Twitch API status page and don’t see any unusual behaviour.

The following request doesn’t work and returns a ‘res.statusCode’ of 503:

However, this isn’t just limited to the ‘type’ parameter. The same happens when you supply ‘?first=1’ as parameter.

Doing an API request without any optional parameters works just fine, as I expect it to.

I know that you can’t specify any parameters if you use the video ID but that is not what I’m doing here.

Any thoughts on how to fix this?

You’re using querystring parameters wrong. You only use the ? symbol once, at the end of the endpoint path to indicate the start of the querystring, and then you use an ampersand & between each param.

So instead of ?user_id=${streamID}?type=archive try ?user_id=${streamID}&type=archive

I think I need a coffee and some sleep.

Thanks for spotting @Dist !

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