Display Online Status JAVASCRIPT ONLY

Not in pure front end no.

You need to use a token to call the API.

So you need to either

  • ask the user to login, so you have a token,

or

  • call a backend service which users an app access token to do status check

or

  • use eventsub to collect streamer status into a database and the database feeds your frontend