https://api.twitch.tv/kraken/channels/<channel ID>/community
When going to some (maybe all) users that aren’t a part of a community, nothing is returned, not even an error or HTTP code.
I know my channel id causes this bug for sure: https://api.twitch.tv/kraken/channels/71619374/community?client_id=3s27p59atb0bwu6vkh2rnrxeqx3dn3h&api_version=5
But when I join a community, that exact link properly returns my community information.
It doesn’t show anything in the browser for me, but that seems like correct behaviour. It returns a 204 response code, which means no content. This doesn’t seem to be documented for this endpoint though.
@tduva is correct. It just returns a 204 No Content. It isn’t a bug, but it is confusing. I’ll chat with the team about returning something like a 404 (since there is no community found).
It might be confusing, but it does seem correct. It’s not an error if a channel has no community set, so it should be a 2xx code. I would understand a 404 as “that channel doesn’t exist”, although currently that seems to be 400. I think it’s more important to actually document all the possible response codes for all endpoints.
If it does get changed it should be communicated/documented as well, otherwise it could lead to problems when clients suddenly receive an error instead of an “All good, just nothing here” response (or just a changed/unexpected response in general).