N
Nuxt4mo ago
Dan Mizu

Connecting to External Websocket

I need to connect to the StreamElements platform to receive events when viewers of a stream follow, subscribe, etc. This is their example:
const socket = io('https://realtime.streamelements.com', {
transports: ['websocket']
});
const socket = io('https://realtime.streamelements.com', {
transports: ['websocket']
});
I was looking into the experimental websocket support that Nuxt is implementing and have enabled it in my config, but looking at the examples online so far have shown setting them up to have events pass between the server and client but havent seen an example of an external websocket connection. I need to eventually pass it a private token as well so I'd like to keep the entire connection server side. Can someone point me to an example or offer an idea as to how I would get that working? Many thanks in advance! https://dev.streamelements.com/docs/api-docs/5a84cc101a9c5-connecting-via-websocket-using-o-auth2
Connecting via Websocket using OAuth2 | API Reference
After gaining the AccessToken make sure to pass it in the const in the JS bellow. Powered by Stoplight.
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server