Problem to find closed Twitch accounts

Well, my Challenge is almost over, everything is done, but I can’t yet find out when an account is closed and when is only offline. I’d appreciate any help to know when a channel is closed and when is offline.

This is the how the request I’m making looks, to a channel named touchdown_bundy, a channel I know is always offline, but is not closed.

type: ‘GET’,
url: “”,
dataType: “jsonp”,
jsonpCallback: “twitchcallback”

The info I’m getting looks like this:


Now, when I request the info concerning a channel that does not exist, for example touchdown_bundy123, I get the exact same information, so I can make no distinction between offline and closed:


You can take a look at my almost finished project right here:

I actually had this very same problem. Since they updated twitch’s api stuff the json info for closed accounts seems to be flat out gone. How I fixed mine was to set it so that if the jsonp(in my case) couldn’t find it(so had a problem with the call) then I had the error function create the closed account with the name of the user gotten from the array. Hope that helps I’m definitely just creeping into intermediate skill myself with JS.

I actually did something like that, I set it so that if the streamer is not into the jsonp I’m getting, it would take the status as offline, but still can’t separate offline from closed. I’m taking all missing streamers as offline right now.

One thing I do know is that part of the json data has a property called “stream”. If a user is offline that stream will be “null”. For mine I had an if statement where if === null, then it would create the offline content.

Yeah, the documentation says it should return null for offline, but it’s actually returning an empty array for all cases.
This is what I’m getting for offline streamers:


I get this for closed channels:


And This for channels that doesn’t exist:


Did you ever figure out what to do with separating the closed from the offline accounts? I’m having the same problem.

1 Like