This guide is aimed at users with a developer profile who have previous experience in integrations with OAuth systems or Social Login. The guide may become obsolete due to the frequent changes that social networks make in their developer environment and APIs, but they serve as a reference to get started.
What do you need before you start?
The Redirect URL: This is the URL that you will indicate in theTwitch OAuth Client ID configuration. You will find this URL in Integrations section > Twitch OAuth Login in your promotion:º
How to create and integrate the application?
For your own Twitch application to be displayed on your domain when a user logs into your promotion with Twitch Login, it will be necessary to follow the next steps to generate the keys and integrate the application within the promotion:
1. Enable the API for your project:
A. Open the "Applications" library in the Twitch Developer Console: https://dev.twitch.tv/login
B. Edit or create a new app by clicking "Register your application". A new page will open where you will be requested to indicate the information of the application, with the domain used in the promotion as well as the following data:
- Application name
- Redirect URL
In this same section, you will need to include the redirection URL that you will find under the Integrations section of your promotion > Twitch OAuth Login.
2. Once the application is created, click "Manage":
3. In this section, you will find the "Client ID" and need to generate the "Client secret". Click "New Secret" to generate it:
4. Once generated, copy the Client Secret as well as the Client ID:
Note: Once the application is created, it will be under review. As long as Twitch authorizes the created application, it can be used in test mode. While the application is in test mode, only the domain of the promotion will be displayed. The name and logo will not be displayed.
5. Enter now the Integrations section > Twitch OAuth Login in your promotion and paste the "Client ID" and "Client Secret":
6. Save the configuration. The integration is now completed, congratulations!
Test the Twitch login in your promotion
To verify that the connection has been made correctly, enter your promotion and log in using the Twitch Login. Make sure you do the test from the promotion URL using your own domain.
If the Twitch authorization screen appears with your own domain, the integration was successful: