Update channel status return 404 error

api version 3 and 5 has the same error for next urls

https://api.twitch.tv/kraken/channels/kutu182/?oauth_token=le7r...lwtow49d&_method=put&channel%5Bstatus%5D=bla&channel%5Bgame%5D=iRacing.com

https://api.twitch.tv/kraken/channels/26361988/?api_version=5&oauth_token=le...ow49d&_method=put&channel%5Bstatus%5D=bla&channel%5Bgame%5D=iRacing.com

both return:
{"error":"Not Found","status":404,"message":""}

1 Like

Hmmm sounds like your request is not put-ing properly.

If you are using CURL please use the right flags:

-H 'Accept: application/vnd.twitchtv.v5+json' \
-H 'Authorization: OAuth cfabdegwdoklmawdzdo98xt2fo512y' \
-H 'Content-Type: application/json' \
-d '{"channel": {"status": "The Finalest of Fantasies", "game": "Final Fantasy XV", "channel_feed_enabled": true}}' \
-X PUT 'https://api.twitch.tv/kraken/channels/44322889'```

https://dev.twitch.tv/docs/v5/reference/channels/#update-channel

I think your request is performing `GET` instead of a `PUT` request here

i request from browser, and i set parameter _method=put

That won’t work.

_method is not valid, and your browser is sending a get request.

You cannot just put this in a browser.

well, it worked few years until yesterday
and devs said in many places to use this parameter with jsonp requests
and there was no announcement that this method is deprecated, maybe i missed it

I switched to pure $.ajax instead of $.getJSON function, now its working

You didn’t mention you were performing JSONP requests and thus I gave the wrong answer to your question

_method to override the method has worked for years; it’s what the JS SDK and browsers without CORS support rely on.

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