Code stopped working on Sept 26/27 - What changed?


#1

Here is my very basic code to pull from the Twitch API via ASP, what happened on Sept 27 that is now causing this to not work anymore? I can use this code to get rss feeds and other things, so its not my server / code related, seems more focused on authen / grabbing from twitch is the problem.

<%
Response.ContentType = "application/json"
Response.AddHeader "Content-Type", "application/json;charset=UTF-8"
Response.CodePage = 65001
Response.CharSet = "UTF-8"

SUB makeFeed(url)

Set xml = Server.CreateObject("Microsoft.XMLHTTP")
xml.Open "GET", url, False
xml.setRequestHeader "Client-ID", "MYSECRETCODEHERE"
xml.setRequestHeader "Accept", "application/vnd.twitchtv.v5+json"
xml.setRequestHeader "Content-Type", "text/html;charset=UTF-8"

xml.Send
sXml = xml.responseText
Response.write sXML

Set xml = Nothing
Set sXml = Nothing

end sub

dim idz
idz = Request.QueryString("id")


If idz = "1" Then
makeFeed("https://api.twitch.tv/helix/games/top")
Else
Response.write ""
End If

%>

#2

What is the error you are getting?

xml.setRequestHeader “Client-ID”, “MYSECRETCODEHERE”

This should be your Public Client ID. Not your Client Secret.

I see you are calling

https://api.twitch.tv/helix/games/top

Sometimes it just hiccups and you get a unexpected code. So the question is, what error are you geting


#3

Hello,

Yah I am using the Client ID, the error I think is now on my server end. Did some changes to force the server to use tlc 1.2, and now some GET requests are failing, while others work.

This for instance will work

makeFeed(“https://api.bf4stats.com/api/onlinePlayers?output=lines”)

Here is the exact error, its not very helpful sadly…

Any idea how strict Twitch’s API security levels are for SSL etc?


#4

I solved my issue, I had to do some REGEDITS on the server to force it to use TLS 1.2…

I guess that means Twitch API only wants that and maybe in the past they allowed TLS 1.0 etc