twitchdev / issues

Issue tracker for third party developers.
Apache License 2.0
74 stars 6 forks source link

Modify Channel with empty tags array not working #708

Open chillymosh opened 1 year ago

chillymosh commented 1 year ago

Brief description Using the modify channel information endpoint PATCH https://api.twitch.tv/helix/channels and passing an empty array for tags does not remove all the tags, it returns error 400.

{"error":"Bad Request","status":400,"message":"The request must update at least one channel property field."}

If you pass in multiple fields then it does update them but ignores the empty tags array and it remains in the existing state.

curl -X PATCH 'https://api.twitch.tv/helix/channels?broadcaster_id=<id>' \
-H 'Authorization: Bearer <bearer>' \
-H 'Client-Id: <client_id>' \
-H 'Content-Type: application/json' \
--data-raw '{"title":"there are helicopters in the game?", "broadcaster_language":"en", "tags":[]}'

How to reproduce

curl -X PATCH 'https://api.twitch.tv/helix/channels?broadcaster_id=<id>' \
-H 'Authorization: Bearer <bearer>' \
-H 'Client-Id: <client_id>' \
-H 'Content-Type: application/json' \
--data-raw '{"tags":[]}'

Expected behavior This should remove all the tags for the channel.

Screenshots

Additional context or questions

pcboii commented 1 year ago

I have also ran into this issue when trying to submit an empty tags array

Xemdo commented 1 year ago

Ticketed internally as HLX-2950

Luke6285 commented 11 months ago

Something I've been doing in the mean time to clear tags is setting the default language tag that Twitch automatically applies to a channel anyways. As long as you know a channels language this is an easy way to remove all tags in one request.