API Borked? Uptime Command Errors

Im generally confused my !uptime command was working a couple days ago with my IRC bot, but now it can’t recieve or read the API, I tried manually and get a {“error”:“Bad Request”,“message”:“No client id specified”,“status”:400} when using the correct Channel name, As the bot reads the channel name through the script.

A Paste Bin To My Script : http://pastebin.com/xQxKVkJB

You need to include your client ID in the request. You can get one by registering the application via your connection settings on Twitch.

Wouldn’t I not need a client ID due to using oath to connect to the IRC server?

The IRC connection is in no way connected to the HTTP requests you make to the Kraken API. You should be able to use the oauth token as well, though it seems to be broken for /streams at the moment:

How can I implement my Client ID into a MIRC script?

The easiest way would be just adding it to the URL, so

if ($mysocket(twitchuptime,https://api.twitch.tv/kraken/streams?channel= $+ $2)) {

becomes

if ($mysocket(twitchuptime,https://api.twitch.tv/kraken/streams?client_id=<your_client_id_here>&channel= $+ $2)) {

Thank you so much, I’ll try this now :slight_smile:

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