Twitch TV API instructions Deprecated

Twitch TV API instructions Deprecated
0

#1

Hi

I just getting my feet wet with the Twitch TV app
The links for the api are all ‘Depricated’ and not available
The work around is set to be deleted before the end of 2018
I tried registering with Twitch developer but it asks for a company and a matching email to register for a ‘key’ and a ‘secret’ code which they don’t want to be seen from the CodePen code.

Any suggestions as to how to complete this project without the API instructions?


#2

read paragraph 9 of the instructions

UPDATE: Due to a change in conditions on API usage explained here Twitch.tv now requires an API key, but we’ve built a workaround. Use https://wind-bow.glitch.me/twitch-api instead of twitch’s API base URL (i.e. https://api.twitch.tv/kraken ) and you’ll still be able to get account information, without needing to sign up for an API key.


#3

Yes I read the whole set of instructions

That link from the instructions goes here: https://wind-bow.glitch.me/

That link has a link to: https://github.com/justintv/Twitch-API which used to be the documentation but now is cleared out but not yet deleted.

Unless you are saying the first link is all we need with no parameters?

When I try https://wind-bow.gomix.me/twitch-api in my browser I get error 404


#4

We are aware of the issue and changes are being made. In the future, this will not be a required project but a side optional one. You have several options: skip this project as this wasn’t intended and this project won’t be required in the future, or you can power your way through it anyway because you’re stubborn and like a challenge. In case of the latter, let me help you.

As for the link, you have to specify the ending route:

https://wind-bow.glitch.me/twitch-api/users/
https://wind-bow.glitch.me/twitch-api/channels/
https://wind-bow.glitch.me/twitch-api/streams

Example:
https://wind-bow.glitch.me/twitch-api/users/rocketleague
https://wind-bow.glitch.me/twitch-api/streams/rocketleague
https://wind-bow.glitch.me/twitch-api/channels/rocketleague

When you open those in your browser, you will see the JSON data that you want. If you have problems seeing it in your browser like this:

{"mature":false,"status":"[REBROADCAST] RLCS Overtime Episode 35","broadcaster_language":"en","display_name":"RocketLeague","game":"Rocket League","language":"en","_id":57781936,"name":"rocketleague","created_at":"2014-02-26T16:42:48Z","updated_at":"2018-01-18T16:07:08Z","partner":true,"logo":"https://static-cdn.jtvnw.net/jtv_user_pictures/rocketleague-profile_image-f5fabf3cf497c312-300x300.png","video_banner":"https://static-cdn.jtvnw.net/jtv_user_pictures/0b544601ec5cf2b7-channel_offline_image-1920x1080.jpeg","profile_banner":"https://static-cdn.jtvnw.net/jtv_user_pictures/rocketleague-profile_banner-6e4b388b9c6d3f6c-480.jpeg","profile_banner_background_color":null,"url":"https://www.twitch.tv/rocketleague","views":39042379,"followers":550250,"_links":{"self":"https://api.twitch.tv/kraken/channels/rocketleague","follows":"https://api.twitch.tv/kraken/channels/rocketleague/follows","commercial":"https://api.twitch.tv/kraken/channels/rocketleague/commercial","stream_key":"https://api.twitch.tv/kraken/channels/rocketleague/stream_key","chat":"https://api.twitch.tv/kraken/chat/rocketleague","features":"https://api.twitch.tv/kraken/channels/rocketleague/features","subscriptions":"https://api.twitch.tv/kraken/channels/rocketleague/subscriptions","editors":"https://api.twitch.tv/kraken/channels/rocketleague/editors","teams":"https://api.twitch.tv/kraken/channels/rocketleague/teams","videos":"https://api.twitch.tv/kraken/channels/rocketleague/videos"},"delay":null,"banner":null,"background":null}

You will then want to install an extension to format it so you can see it better. I recommend this one.

You will then be able to properly find all the data that you need. For example:

// 20180118160631 (this is just a timestamp)
// https://wind-bow.glitch.me/twitch-api/channels/rocketleague (this is the link)

{
  "mature": false,
  "status": "[REBROADCAST] RLCS Overtime Episode 35",
  "broadcaster_language": "en",
  "display_name": "RocketLeague",
  "game": "Rocket League",
  "language": "en",
  "_id": 57781936,
  "name": "rocketleague",
  "created_at": "2014-02-26T16:42:48Z",
  "updated_at": "2018-01-18T16:07:08Z",
  "partner": true,
  "logo": "https://static-cdn.jtvnw.net/jtv_user_pictures/rocketleague-profile_image-f5fabf3cf497c312-300x300.png",
  "video_banner": "https://static-cdn.jtvnw.net/jtv_user_pictures/0b544601ec5cf2b7-channel_offline_image-1920x1080.jpeg",
  "profile_banner": "https://static-cdn.jtvnw.net/jtv_user_pictures/rocketleague-profile_banner-6e4b388b9c6d3f6c-480.jpeg",
  "profile_banner_background_color": null,
  "url": "https://www.twitch.tv/rocketleague",
  "views": 39042379,
  "followers": 550250,
  "_links": {
    "self": "https://api.twitch.tv/kraken/channels/rocketleague",
    "follows": "https://api.twitch.tv/kraken/channels/rocketleague/follows",
    "commercial": "https://api.twitch.tv/kraken/channels/rocketleague/commercial",
    "stream_key": "https://api.twitch.tv/kraken/channels/rocketleague/stream_key",
    "chat": "https://api.twitch.tv/kraken/chat/rocketleague",
    "features": "https://api.twitch.tv/kraken/channels/rocketleague/features",
    "subscriptions": "https://api.twitch.tv/kraken/channels/rocketleague/subscriptions",
    "editors": "https://api.twitch.tv/kraken/channels/rocketleague/editors",
    "teams": "https://api.twitch.tv/kraken/channels/rocketleague/teams",
    "videos": "https://api.twitch.tv/kraken/channels/rocketleague/videos"
  },
  "delay": null,
  "banner": null,
  "background": null
}

You will probably want something like json.game and json.logo etc. All you need is the three base links I showed above, and then you can go from there. Special note if you are looking at the json._links in the data above. Since you aren’t using that link, you will replace:

https://api.twitch.tv/kraken/

with

https://wind-bow.glitch.me/twitch-api/

and everything will work then.


#5

Let me help you with the documentation. Yes, they edited the GitHub site, but the nice thing about GitHub is that all the changes are saved (that’s why it’s called “version control”). You can hit the commits button and go back to an earlier version of the site. I have already went through and got it for you, you can use this link to view the documentation as it did in 2016:

https://github.com/justintv/Twitch-API/tree/5bc681b3b6e4aedd893b5818e5a199bbc656931e


#6

Thanks…this is more than I hoped for!


#7

yet again it has a note there

NOTE:
This server caches data to lower the request rate. To prevent abuses this server accepts GET requests only, and serves only routes /users/:user, /channels/:channel, and /streams/:stream. These are more than enough to complete the challenge.


#8

Yes I didn’t put that together until it was spelled out for me by IsaacAbrahamson
I’ve only started 6 weeks ago so I haven’t picked up on the nomenclature of the API calls
Thanks