Simple Check if channel is live via client-side javascript

run this in your browser after you replace the client_id with your id.

https://id.twitch.tv/oauth2/authorize?response_type=token&client_id=60xdja3y8iy87xmwm27spsliedd4cs&redirect_uri=http://localhost&scope=channel:manage:broadcast

make sure you don’t delete the & when replacing the id. after you run that you will get an access token.

then run this command but replace the asdf;asldfkja;sldkfj with the access token you got. also replace swervinmaximus with the user you are trying to look up.

curl -X GET ‘https://api.twitch.tv/helix/search/channels?query=swervinmaximus
-H ‘Authorization: Bearer asdf;asldfkja;sldkfj’
-H ‘Client-Id: 60xdja3y8iy87xmwm27spsliedd4cs’

that should get you the information you need about your stream. write a function to parse the info to get the value to change your div. hope this helped. let me know if you have more questions.