Skip to content

Notification: Twitch

Jef LeCompte edited this page Jan 12, 2021 · 1 revision

I've never used this before, but I used these instructions to get it working. Seems to be working good!

Creating an Application from https://dev.twitch.tv/console/apps:

image

Must use unique name. Use https://www.uuidgenerator.net/ to get a UUID and append it to streetmerchant-.

Modified Address:

image

https://id.twitch.tv/oauth2/authorize?client_id=CLIENT_ID
	&redirect_uri=REDIRECT_URI
	&response_type=code
	&scope=chat:read+chat:edit

Gave me:

image

Use the code=87xgcbqxdtfudwhii4tbt2tmr9yj3n in this command:

https://id.twitch.tv/oauth2/token?client_id=CLIENT_ID
    &client_secret=CLIENT_SECRET
    &code=CODE_FROM_LAST_REQUEST
    &grant_type=authorization_code
    &redirect_uri=REDIRECT_URI

Here is the cURL request:

curl --location --request POST 'https://id.twitch.tv/oauth2/token?client_id=u3qgn2z1hu2otqcp6regws89ykyvq0&client_secret=joax18druor9tpdo46807bqa1ewdgd&code=87xgcbqxdtfudwhii4tbt2tmr9yj3n&grant_type=authorization_code&redirect_uri=http://localhost'

Feel free to use Postman or something similar:

image

With all my tokens now received, I can fill out the required information in my dotenv:

SHOW_ONLY_SERIES=test:series
STORES=amazon
HEADLESS=true
TWITCH_CLIENT_ID=u3qgn2z1hu2otqcp6regws89ykyvq0
TWITCH_CLIENT_SECRET=joax18druor9tpdo46807bqa1ewdgd
TWITCH_ACCESS_TOKEN=s38jey4reo3n7gqct0bdvz6lr9ogp3
TWITCH_REFRESH_TOKEN=p6dsl7j8txjaaxc87dvxie0xn8i6xqcdtdqtqnk5kldrf8j031
TWITCH_CHANNEL=hijef

image