mIRC Homepage
Posted By: judge2020 [help] getting errors with twitch api - 27/07/14 07:50 PM
Didn't think reviving an old thread would be a good idea
old one: https://forums.mirc.com/ubbthreads.php/topics/246660/Re:_Running_commercials_with_t

In the past week or so the twitch API hasn't been working. Always says could not set topic or could not follow. I have not made any edits to the twitch.mrc, but i did move it over to an actual cloud server (aws.amazon.com). Could there be some ports i need to open or do anything in the server to get the the twitch api working?
Posted By: judge2020 Re: [help] getting errors with twitch api - 27/07/14 09:23 PM
also:
i tried totally redownloading twitch.mrc AND using a whole new registered application, still no luck
Posted By: Shakar Re: [help] getting errors with twitch api - 28/07/14 05:00 PM
I am also having the same issue, but what the script is not the issue, but the JSON parsing.
For some reason that I haven't been able to find out yet, json.mrc is not able to parse the response from twitch api anymore
works fine for me. i tried the justin api tho
Posted By: Shakar Re: [help] getting errors with twitch api - 30/07/14 02:13 PM
If I parse directly from a url, it works fine. But if it saves the data to a text file then the parsing fails
Posted By: Loki12583 Re: [help] getting errors with twitch api - 30/07/14 03:35 PM
The script did not originally support chunked transfer encoding which Twitch seemed to use even when requesting HTTP/1.0; this resulted in corrupt files. If you grab and replace the sockread event from github it should work again.

If that is not the case, you need to find the line it's failing at and come up with a reproducible example.
Posted By: judge2020 Re: [help] getting errors with twitch api - 30/07/14 08:49 PM
i feel like i need to open some port on my server since i get an instant "could not set status", not delayed where it's trying. I opened the HTTPS 443 port (inbound and outbound) through the windows firewall and server firewall, but still gives instant error.
Posted By: Loki12583 Re: [help] getting errors with twitch api - 30/07/14 10:15 PM
I think getting an instant reply indicates that there was no socket error, but an error in the response. Why don't you check how far you're getting and what's in the file?
Posted By: judge2020 Re: [help] getting errors with twitch api - 01/08/14 12:46 AM
i don't get what you mean by
Quote:
what's in the file?
i don't see it writing to any file, also removing the
Code:
  .remove %header | .remove %data
in signal topic.set doesn't do anything, so it looks like it doesn't get to the signal.
Code:
    hadd %sockname signal topic.set
looks like the signal topic.set needs some input there..
Code:
  var %err = $1, %sockname = $2, %header = $3, %data = $4
don't know if you need to input some stuff but i basically see that as a alias
© mIRC Discussion Forums