Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

twitchwebsub

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

twitchwebsub

[![Sub on Twitch](https://static-cdn.jtvnw.net/jtv_user_pictures/panel-51684790-image-2c23ef005f9a4731-320-320.png)](https://www.twitch.tv/modesttim/subscribe)

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7
increased by133.33%
Maintainers
1
Weekly downloads
 
Created
Source

Twitch WebSub Webhooks

Sub on Twitch


Example

$ npm install
$ CLIENT_ID=YOUR_TWITCH_CLIENT_ID_HERE node examples/run.js

Install from npm

$ npm install twitchwebsub

Usage

Create a new TwitchWebSub server object

var TwitchWebSub = require("twitchwebsub");
var WebSub = TwitchWebSub.server(options);

// Listen on port 9001
WebSub.listen(9001);
Options
KeyTypeDescription
callbackstringurl that twitch will call to get to this program
client_idstringTwitch API client id
secretstringOptional - Default :: "I hate my life and don't care if people spoof requests from Twitch."

Events

KeyParametersDescription
listenHTTP server is listening for connections.
errorerrWe've run into a problem.
denieddataSubscription request was denied by Twitch
subscribedataSuccessfully subscribed to a Topic
unsubscribedataSubscription was canceled by Twitch
feeddataTwitch sent us information about a subscription

Functions

.listen(port) - Listen for http requests on a given port
.subscribe(topic) - Subscribe to a topic
.unsubscribe(topic) - Unsubscribe from a topic
.on(event, callback) - Listen for an event from twitch

Keywords

FAQs

Package last updated on 30 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc