Determine whether channel is banned from Twitch or does not exists

I have some channel logins, and some of them are deleted, banned, or temporary blocked. Since the use of GQL is not allowed, how can I do this using other APIs?

There is no API that lets you tell the difference between a deleted or banned account.

One that is banned or deleted jsut disappears from the third party API

Even connecting to the channel will return

@msg-id=msg_channel_suspended : tmi.twitch.tv NOTICE #REDCATED :This channel does not exist or has been suspended

So you can’t tell the difference there either

Essentially it’s a “privacy” thing I believe.

This is strange because even on twitch.tv in any chat of any channel you can type
/user username
and get a card which says that this user is temporarily or permanently banned if so

That refers to the ban/timeout in that channel and as a moderator/broadcaster you have the authority to review data pertaining to your channel.

It doesn’t refer to a site wide “ban” which is an entirely different kettle of fish.
A site wide “ban” is not data pertaining to your channel.

Or if you are thinking about this for example (as a non mod in a channel):

image

That doesn’t tell you if it’s a ban or a deletion.

But if the channel does not exists, there is the message: “No user matching that login.”
I would like to differ suspended or deactivated accounts from non-existing ones

There is no way to do that in the API.

A given username, will not return via Get Users

  • if that name never existed
  • if that account is deactivated
  • if that account got TOS’ed

The API just will not return them.

This doesn’t make sense :man_facepalming:
Thank you for the answer

Another point just to add to the conversation on a usernames potential state, “No user matching that login.” being returned by the user card could also mean several things.

  • That user name may be valid, never used, and available
  • It could be previously held by an account that changed name, and so is reserved and not available
  • It could now be for a Twitch account that’s a redirect and not an actual user, and not available for use
  • It could be a reserved name, and not available for use

None of that can be determined by the API either.