[JS] i have trouble with fetching the viewerlist from a channel


#1

I’m trying to fetch the viewerlist with JavaScript by using:
fetch('https://tmi.twitch.tv/group/user/strencher_/chatters').then(console.log)
but i ran into an error:

does someone know how to fix this? or what i’m doing wrong?


#2

You can’t do this call in client side javascript due to the CORS restriction.

Use server side.


#3

what do you mean with serve side?


#4

Client side generally means in the browser.


#5

and server side?


#6

Server side Javascript is normally NodeJS.


#7

Okay Thanks! have a good day.


#8

Sorry for misreading, I swear you said “whats client side” in your first reply