justintv / Twitch-API

A home for details about our API
www.twitch.tv
1.72k stars 379 forks source link

Endpoint not using IDs #661

Closed SiR-DanieL closed 7 years ago

SiR-DanieL commented 7 years ago

FYI, I was working on a Follow button with the API, and if I use the endpoint as explained in the documentation, using the user and channel ID, it does not work.

It keeps saying that the user 1234567 and channel 987654 do not exist. Replacing them with the username and the channel name works perfectly.

Update your doc please.

jwmalara commented 7 years ago

Are you using V5 of the API? They are defaulting to V3 until Feb 14. You need to use the application/vnd.twitchtv.v5+json header on your requests for now and should in the future.

See: https://dev.twitch.tv/docs/v5/guides/using-the-twitch-api

SiR-DanieL commented 7 years ago

OK, makes sense! Thanks!