twitchAPI.types

Type Definitions

enum twitchAPI.types.AnalyticsReportType(value)

Enum of all Analytics report types

Valid values are as follows:

V1 = <AnalyticsReportType.V1: 'overview_v1'>
V2 = <AnalyticsReportType.V2: 'overview_v2'>
enum twitchAPI.types.AuthScope(value)

Enum of Authentication scopes

Valid values are as follows:

ANALYTICS_READ_EXTENSION = <AuthScope.ANALYTICS_READ_EXTENSION: 'analytics:read:extensions'>
ANALYTICS_READ_GAMES = <AuthScope.ANALYTICS_READ_GAMES: 'analytics:read:games'>
BITS_READ = <AuthScope.BITS_READ: 'bits:read'>
CHANNEL_READ_SUBSCRIPTIONS = <AuthScope.CHANNEL_READ_SUBSCRIPTIONS: 'channel:read:subscriptions'>
CHANNEL_READ_STREAM_KEY = <AuthScope.CHANNEL_READ_STREAM_KEY: 'channel:read:stream_key'>
CHANNEL_EDIT_COMMERCIAL = <AuthScope.CHANNEL_EDIT_COMMERCIAL: 'channel:edit:commercial'>
CHANNEL_READ_HYPE_TRAIN = <AuthScope.CHANNEL_READ_HYPE_TRAIN: 'channel:read:hype_train'>
CHANNEL_MANAGE_BROADCAST = <AuthScope.CHANNEL_MANAGE_BROADCAST: 'channel:manage:broadcast'>
CHANNEL_READ_REDEMPTIONS = <AuthScope.CHANNEL_READ_REDEMPTIONS: 'channel:read:redemptions'>
CHANNEL_MANAGE_REDEMPTIONS = <AuthScope.CHANNEL_MANAGE_REDEMPTIONS: 'channel:manage:redemptions'>
CLIPS_EDIT = <AuthScope.CLIPS_EDIT: 'clips:edit'>
USER_EDIT = <AuthScope.USER_EDIT: 'user:edit'>
USER_EDIT_BROADCAST = <AuthScope.USER_EDIT_BROADCAST: 'user:edit:broadcast'>
USER_READ_BROADCAST = <AuthScope.USER_READ_BROADCAST: 'user:read:broadcast'>
USER_READ_EMAIL = <AuthScope.USER_READ_EMAIL: 'user:read:email'>
USER_EDIT_FOLLOWS = <AuthScope.USER_EDIT_FOLLOWS: 'user:edit:follows'>
CHANNEL_MODERATE = <AuthScope.CHANNEL_MODERATE: 'channel:moderate'>
CHAT_EDIT = <AuthScope.CHAT_EDIT: 'chat:edit'>
CHAT_READ = <AuthScope.CHAT_READ: 'chat:read'>
WHISPERS_READ = <AuthScope.WHISPERS_READ: 'whispers:read'>
WHISPERS_EDIT = <AuthScope.WHISPERS_EDIT: 'whispers:edit'>
MODERATION_READ = <AuthScope.MODERATION_READ: 'moderation:read'>
CHANNEL_SUBSCRIPTIONS = <AuthScope.CHANNEL_SUBSCRIPTIONS: 'channel_subscriptions'>
CHANNEL_READ_EDITORS = <AuthScope.CHANNEL_READ_EDITORS: 'channel:read:editors'>
CHANNEL_MANAGE_VIDEOS = <AuthScope.CHANNEL_MANAGE_VIDEOS: 'channel:manage:videos'>
USER_READ_BLOCKED_USERS = <AuthScope.USER_READ_BLOCKED_USERS: 'user:read:blocked_users'>
USER_MANAGE_BLOCKED_USERS = <AuthScope.USER_MANAGE_BLOCKED_USERS: 'user:manage:blocked_users'>
USER_READ_SUBSCRIPTIONS = <AuthScope.USER_READ_SUBSCRIPTIONS: 'user:read:subscriptions'>
USER_READ_FOLLOWS = <AuthScope.USER_READ_FOLLOWS: 'user:read:follows'>
CHANNEL_READ_GOALS = <AuthScope.CHANNEL_READ_GOALS: 'channel:read:goals'>
CHANNEL_READ_POLLS = <AuthScope.CHANNEL_READ_POLLS: 'channel:read:polls'>
CHANNEL_MANAGE_POLLS = <AuthScope.CHANNEL_MANAGE_POLLS: 'channel:manage:polls'>
CHANNEL_READ_PREDICTIONS = <AuthScope.CHANNEL_READ_PREDICTIONS: 'channel:read:predictions'>
CHANNEL_MANAGE_PREDICTIONS = <AuthScope.CHANNEL_MANAGE_PREDICTIONS: 'channel:manage:predictions'>
MODERATOR_MANAGE_AUTOMOD = <AuthScope.MODERATOR_MANAGE_AUTOMOD: 'moderator:manage:automod'>
CHANNEL_MANAGE_SCHEDULE = <AuthScope.CHANNEL_MANAGE_SCHEDULE: 'channel:manage:schedule'>
CHANNEL_MANAGE_CHAT_SETTINGS = <AuthScope.CHANNEL_MANAGE_CHAT_SETTINGS: 'channel:manage:chat_settings'>
MODERATOR_MANAGE_BANNED_USERS = <AuthScope.MODERATOR_MANAGE_BANNED_USERS: 'moderator:manage:banned_users'>
MODERATOR_READ_BLOCKED_TERMS = <AuthScope.MODERATOR_READ_BLOCKED_TERMS: 'moderator:read:blocked_terms'>
MODERATOR_MANAGE_BLOCKED_TERMS = <AuthScope.MODERATOR_MANAGE_BLOCKED_TERMS: 'moderator:manage:blocked_terms'>
enum twitchAPI.types.ModerationEventType(value)

Enum of moderation event types

Valid values are as follows:

BAN = <ModerationEventType.BAN: 'moderation.user.ban'>
UNBAN = <ModerationEventType.UNBAN: 'moderation.user.unban'>
UNKNOWN = <ModerationEventType.UNKNOWN: ''>
enum twitchAPI.types.TimePeriod(value)

Enum of valid Time periods

Valid values are as follows:

ALL = <TimePeriod.ALL: 'all'>
DAY = <TimePeriod.DAY: 'day'>
WEEK = <TimePeriod.WEEK: 'week'>
MONTH = <TimePeriod.MONTH: 'month'>
YEAR = <TimePeriod.YEAR: 'year'>
enum twitchAPI.types.SortMethod(value)

Enum of valid sort methods

Valid values are as follows:

TIME = <SortMethod.TIME: 'time'>
TRENDING = <SortMethod.TRENDING: 'trending'>
VIEWS = <SortMethod.VIEWS: 'views'>
enum twitchAPI.types.HypeTrainContributionMethod(value)

Enum of valid Hype Train contribution types

Valid values are as follows:

BITS = <HypeTrainContributionMethod.BITS: 'BITS'>
SUBS = <HypeTrainContributionMethod.SUBS: 'SUBS'>
UNKNOWN = <HypeTrainContributionMethod.UNKNOWN: ''>
enum twitchAPI.types.VideoType(value)

Enum of valid video types

Valid values are as follows:

ALL = <VideoType.ALL: 'all'>
UPLOAD = <VideoType.UPLOAD: 'upload'>
ARCHIVE = <VideoType.ARCHIVE: 'archive'>
HIGHLIGHT = <VideoType.HIGHLIGHT: 'highlight'>
UNKNOWN = <VideoType.UNKNOWN: ''>
enum twitchAPI.types.AuthType(value)

Type of authentication required. Only internal use

Valid values are as follows:

NONE = <AuthType.NONE: 0>
USER = <AuthType.USER: 1>
APP = <AuthType.APP: 2>
EITHER = <AuthType.EITHER: 3>
enum twitchAPI.types.CodeStatus(value)

Enum Code Status, see https://dev.twitch.tv/docs/api/reference#get-code-status for more documentation

Valid values are as follows:

SUCCESSFULLY_REDEEMED = <CodeStatus.SUCCESSFULLY_REDEEMED: 'SUCCESSFULLY_REDEEMED'>
ALREADY_CLAIMED = <CodeStatus.ALREADY_CLAIMED: 'ALREADY_CLAIMED'>
EXPIRED = <CodeStatus.EXPIRED: 'EXPIRED'>
USER_NOT_ELIGIBLE = <CodeStatus.USER_NOT_ELIGIBLE: 'USER_NOT_ELIGIBLE'>
NOT_FOUND = <CodeStatus.NOT_FOUND: 'NOT_FOUND'>
INACTIVE = <CodeStatus.INACTIVE: 'INACTIVE'>
UNUSED = <CodeStatus.UNUSED: 'UNUSED'>
INCORRECT_FORMAT = <CodeStatus.INCORRECT_FORMAT: 'INCORRECT_FORMAT'>
INTERNAL_ERROR = <CodeStatus.INTERNAL_ERROR: 'INTERNAL_ERROR'>
UNKNOWN_VALUE = <CodeStatus.UNKNOWN_VALUE: ''>
enum twitchAPI.types.PubSubResponseError(value)

Valid values are as follows:

BAD_MESSAGE = <PubSubResponseError.BAD_MESSAGE: 'ERR_BADMESSAGE'>
BAD_AUTH = <PubSubResponseError.BAD_AUTH: 'ERR_BADAUTH'>
SERVER = <PubSubResponseError.SERVER: 'ERR_SERVER'>
BAD_TOPIC = <PubSubResponseError.BAD_TOPIC: 'ERR_BADTOPIC'>
NONE = <PubSubResponseError.NONE: ''>
UNKNOWN = <PubSubResponseError.UNKNOWN: 'unknown error'>
enum twitchAPI.types.CustomRewardRedemptionStatus(value)

Valid values are as follows:

UNFULFILLED = <CustomRewardRedemptionStatus.UNFULFILLED: 'UNFULFILLED'>
FULFILLED = <CustomRewardRedemptionStatus.FULFILLED: 'FULFILLED'>
CANCELED = <CustomRewardRedemptionStatus.CANCELED: 'CANCELED'>
enum twitchAPI.types.SortOrder(value)

Valid values are as follows:

OLDEST = <SortOrder.OLDEST: 'OLDEST'>
NEWEST = <SortOrder.NEWEST: 'NEWEST'>
enum twitchAPI.types.BlockSourceContext(value)

Valid values are as follows:

CHAT = <BlockSourceContext.CHAT: 'chat'>
WHISPER = <BlockSourceContext.WHISPER: 'whisper'>
enum twitchAPI.types.BlockReason(value)

Valid values are as follows:

SPAM = <BlockReason.SPAM: 'spam'>
HARASSMENT = <BlockReason.HARASSMENT: 'harassment'>
OTHER = <BlockReason.OTHER: 'other'>
enum twitchAPI.types.EntitlementFulfillmentStatus(value)

Valid values are as follows:

CLAIMED = <EntitlementFulfillmentStatus.CLAIMED: 'CLAIMED'>
FULFILLED = <EntitlementFulfillmentStatus.FULFILLED: 'FULFILLED'>
enum twitchAPI.types.PollStatus(value)

Valid values are as follows:

ACTIVE = <PollStatus.ACTIVE: 'ACTIVE'>
COMPLETED = <PollStatus.COMPLETED: 'COMPLETED'>
MODERATED = <PollStatus.MODERATED: 'MODERATED'>
INVALID = <PollStatus.INVALID: 'INVALID'>
TERMINATED = <PollStatus.TERMINATED: ('TERMINATED',)>
ARCHIVED = <PollStatus.ARCHIVED: 'ARCHIVED'>
enum twitchAPI.types.PredictionStatus(value)

Valid values are as follows:

ACTIVE = <PredictionStatus.ACTIVE: 'ACTIVE'>
RESOLVED = <PredictionStatus.RESOLVED: 'RESOLVED'>
CANCELED = <PredictionStatus.CANCELED: 'CANCELED'>
LOCKED = <PredictionStatus.LOCKED: 'LOCKED'>
enum twitchAPI.types.AutoModAction(value)

Valid values are as follows:

ALLOW = <AutoModAction.ALLOW: 'ALLOW'>
DENY = <AutoModAction.DENY: 'DENY'>
class twitchAPI.types.AutoModCheckEntry(**kwargs)
msg_id: str

Developer-generated identifier for mapping messages to results.

msg_text: str

Message text

user_id: str

User ID of the sender

exception twitchAPI.types.TwitchAPIException

Base Twitch API Exception

exception twitchAPI.types.InvalidRefreshTokenException

used User Refresh Token is invalid

exception twitchAPI.types.InvalidTokenException

Used if a invalid token is set for the client

exception twitchAPI.types.NotFoundException

Resource was not found with the given parameter

exception twitchAPI.types.TwitchAuthorizationException

Exception in the Twitch Authorization

exception twitchAPI.types.UnauthorizedException

Not authorized to use this

exception twitchAPI.types.MissingScopeException

authorization is missing scope

exception twitchAPI.types.TwitchBackendException

when the Twitch API itself is down

exception twitchAPI.types.PubSubListenTimeoutException

when a a PubSub listen command times out

exception twitchAPI.types.MissingAppSecretException

When the app secret is not set but app authorization is attempted

exception twitchAPI.types.EventSubSubscriptionTimeout

When the waiting for a confirmed EventSub subscription timed out

exception twitchAPI.types.EventSubSubscriptionConflict

When you try to subscribe to a EventSub subscription that already exists

exception twitchAPI.types.EventSubSubscriptionError

if the subscription request was invalid

exception twitchAPI.types.DeprecatedError

If something has been marked as deprecated by the Twitch API