twitcheasy-twitch-bottwitch-authtwitch-auth-tmitwitch-chat-clienttwitch-eventsubtwitch-pubsub-clienttwitch-webhooks
Welcome

ApiClient

An API client for the Twitch Kraken and Helix APIs.

Overview

Constructor

new ApiClient(config)

Creates a new API client instance.

Parameter Type Required Default Description
config ApiConfig none

Configuration for the client instance.

Properties

badges

Type: BadgesApi

The API methods that deal with badges.

helix

Type: HelixApiGroup

A group of Helix API methods.

kraken

Type: KrakenApiGroup

Deprecated.

Use Helix wherever possible.

A group of Kraken API methods.

unsupported

Type: UnsupportedApi

Various API methods that are not officially supported by Twitch.

Methods

callApi<T>(options)

async

Makes a call to the Twitch API using your access token.

Parameter Type Required Default Description
options TwitchApiCallOptions none

The configuration of the call.

Return type: T

getTokenInfo()

async

Retrieves information about your access token.

Return type: TokenInfo

requestScopes(scopes)

async

Requests scopes from the auth provider.

Parameter Type Required Default Description
scopes Array<string> none

The scopes to request.

Return type: void