Uncaught SyntaxError: Unexpected token p in JSON at position 4?

You need an oAuth token to make requests to helix

If you are not logging the user into your website via oAuth that means an App Access Token

Whilst you can, you should generate an App Access Token each time you need to call Helix you should create one and store and use it till it expires.

You can’t use the oAuth Token on the front end as it constitutes a password and needs to be protected.

So your front end needs to call the server, the server recalls the preexisting App Access Token and calls helix to get the live stream status.

That said, since it’s also a server you can use webhooks instead which means you don’t have to call helix at all, Twitch will tell you when a stream starts and ends. Then you just store the Stream status in your database

https://dev.twitch.tv/docs/api/webhooks-guide