TwurpleAuthenticationGetting dataExamplesFAQMigration

exchangeCode

Definition

exchangeCode(clientId, clientSecret, code, redirectUri)

async

Gets an access token with your client credentials and an authorization code.

ParameterTypeRequiredDefaultDescription
clientIdstringnone

The client ID of your application.

clientSecretstringnone

The client secret of your application.

codestringnone

The authorization code.

redirectUristringnone

The redirect URI.

This serves no real purpose here, but must still match one of the redirect URIs you configured in the Twitch Developer dashboard.

Return type: AccessToken