Get Started
Learn to create an account on Twitch and retrieve your developer credentials.
We'll cover the following
Create a Twitch account
Before we make API calls, we need to register an account on Twitch. Let's follow the steps below to create our account:
Navigate to the official "Sign Up" page of Twitch.
Fill in the details required to create an account, including a unique username, a strong password, and your date of birth.
Click "Use email instead" under the phone number section and enter your email address. We'll be providing our phone number later when setting up two-factor authentication. Click "Sign Up," and you'll be redirected to Twitch's main page.
You'll be sent an email containing an email verification link to the email address you entered in the previous step. Click the verification link, and you'll be redirected to Twitch's main page, where a confirmation message for the email verification is shown. With that, our sign-up process is complete!
These steps are illustrated in the slides below:
Set up 2FA
Before we can generate the credentials required for using the API, we need to set up two-factor authentication (2FA) in our account settings. Let's follow the steps below to do so:
From Twitch's main page, click your profile's icon on the top right corner, and click "Settings."
Click the "Security and Privacy" tab from the tabs at the top, and click the purple "Set Up Two-Factor Authentication" button.
Click "Enable 2FA" on the pop-up that appears, and enter your phone number on the next step of the process. You might be asked to confirm your password before continuing.
Enter the seven-digit code you receive via SMS, and proceed to the next step.
Note: The next step is not required for enabling 2FA, but we recommend completing it to make logging into your Twitch developer console easier in the future.
Next, you'll be prompted to install an authenticator application like Google Authenticator. Install the application on your phone and scan the QR code displayed on the screen with it. Enter the six-digit code on the app, and you've successfully set up two-factor authentication.
These steps are illustrated in the slides below:
With two-factor authentication set up, we can finally turn our attention to the Twitch Developer Console. Like most APIs, we first need to authenticate ourselves through OAuth to be able to make any call to the Twitch API. Depending on the call we make, we either need an app access token or a user access token.
Create an application
We need to create an application on the console to retrieve our credentials. Let's follow the steps below to do so:
Navigate to the Twitch Developer Console.
Go to the "Applications" tab and click the "Register Your Application" button.
Give your application a unique name, and under "OAuth Redirect URLs," enter the URL below. This is the URL on which the applications that run on the Educative platform are served:
{{EDUCATIVE_LIVE_VM_URL}}
Select "Application Integration" from the categories drop-down menu.
Solve any CAPTCHAs you might be shown, and click "Create" to create your application.
The slides below illustrate these steps:
Retrieve your credentials
Once the application is created, we'll be redirected back to the "Applications" page, where our newly created application will be listed. We now need to retrieve our client ID and secret, so let's follow the steps below:
Click "Manage" from the buttons on the application.
On the "Manage Application" page, copy the client ID and store it somewhere safe.
To get the client secret, click the "New Secret" button, then click "OK" on the confirmation pop-up.
Copy the newly generated secret and store it somewhere safe.
These steps are illustrated in the slides below: