API that wraps around the Twitch Helix API to fetch current stream information.
This was made as an companion tool for AutoVOD. So currently it only returns the stream title and current game.
Limitation: The Twitch API doesn't return anything if the streamer is not live.
/info/<username-here>
Clone the repo
git clone https://github.com/jenslys/twitch-api-wrapper.gitCD into the folder
cd twitch-api-wrapperCreate environment file
cp .env.example .envInstall NPM packages
npm installEnvironment variables
-
Register a Twitch application and add
https://localhost/as your redirect url. -
Generate a new client secret.
-
fill in
TWITCH_CLIENT_IDandTWITCH_CLIENT_SECRETinside the.envfile. -
TWITCH_AUTH_TOKENcan be generated and added with the provided curl command or you leave it empty, as it is generated on deployment if the field is empty and it is refreshed every 30 days. So once deployed, the application should be able to run without any further configuration. -
PORTdesired port to run on. defaults to 3000 if empty.
- Hit the button above.
- Leave everything as default.
- Add the required env variables as listed above on vercel.
- Hit deploy.