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.git
CD into the folder
cd twitch-api-wrapper
Create environment file
cp .env.example .env
Install NPM packages
npm install
Environment variables
-
Register a Twitch application and add
https://localhost/
as your redirect url. -
Generate a new client secret.
-
fill in
TWITCH_CLIENT_ID
andTWITCH_CLIENT_SECRET
inside the.env
file. -
TWITCH_AUTH_TOKEN
can 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. -
PORT
desired 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.