TwurpleAuthenticationGetting dataExamplesFAQMigration

callTwitchApi

Definition

callTwitchApi<T>(options, clientId, accessToken, authorizationType, fetchOptions)

async

Makes a call to the Twitch API using given credentials.

ParameterTypeRequiredDefaultDescription
optionsTwitchApiCallOptionsnone

The configuration of the call.

clientIdstringnone

The client ID of your application.

accessTokenstringnone

The access token to call the API with.

You need to obtain one using one of the Twitch OAuth flows.

authorizationTypestringnone

The type of Authorization header to send.

Defaults to "Bearer" for Helix and "OAuth" for everything else.

fetchOptionsTwitchApiCallFetchOptions<complex>

Additional options to be passed to the fetch function.

Return type: T