Changing Twitch Status and Game with API v5

A few things:

  • With v5. you’re required to use a channel ID instead of a channel name in the URL. Right now, you’re passing in lovenpk instead of the channel ID. Docs here: https://dev.twitch.tv/docs/v5/guides/using-the-twitch-api/#translating-from-user-names-to-user-ids

  • You’re doing type: 'GET' but adding &_method=put as a URL parameter. I would remove the &_method=put and change to type: 'PUT'.

  • You need to URL-encode the value you’re sending for the status since it is a query string parameter.

1 Like