# How to get and listen realtime channel events in JavaScript

**URL:** <https://discuss.dev.twitch.com/t/how-to-get-and-listen-realtime-channel-events-in-javascript/30985>\
**Category:** API\
**Created:** [March 24, 2021, 12:43pm UTC](https://discuss.dev.twitch.com/t/how-to-get-and-listen-realtime-channel-events-in-javascript/30985 "2021-03-24T12:43:37Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [March 24, 2021, 12:46pm UTC](https://discuss.dev.twitch.com/t/how-to-get-and-listen-realtime-channel-events-in-javascript/30985/2 "2021-03-24T12:46:13Z")

</div>

In pure clientside

- Followers - [https://dev.twitch.tv/docs/api/reference#get-users-follows](https://dev.twitch.tv/docs/api/reference#get-users-follows) - Long Poll for updates
- Bits - [https://dev.twitch.tv/docs/pubsub](https://dev.twitch.tv/docs/pubsub) - Twitch will send data to the socket when data occurs.
- Subscribers - pubsub as well
- Chat - [https://dev.twitch.tv/docs/irc](https://dev.twitch.tv/docs/irc) - Chat over websockets.

For pure client side you’d normally use implicit auth [https://dev.twitch.tv/docs/authentication/getting-tokens-oauth#oauth-implicit-code-flow](https://dev.twitch.tv/docs/authentication/getting-tokens-oauth#oauth-implicit-code-flow)

---

_[View the full topic](https://discuss.dev.twitch.com/t/how-to-get-and-listen-realtime-channel-events-in-javascript/30985)._
