What to put for hubCallback for youtube-notifaction api

Viewed 142

I am using this: https://www.npmjs.com/package/youtube-notification to get new uploads for my discord bot. I'm not sure what to put for the urlCallback section?

This is the example code:

const notifier = new YouTubeNotifier({
  hubCallback: 'https://example.com/youtube',
  port: 8080,
  secret: 'Something',
  path: '/youtube'
});
notifier.setup();
1 Answers

I think, the documentation for the package makes it pretty clear

Quoting it

YouTubeNotifier.constructor(options) options is an object that you may write your own properties to. The following properties are read by YouTubeNotifier:

  • hubCallback - Your ip/domain name that will be used as a callback URL by Pubsubhubbub. It must be in a URL format, ex: 'https://example.com/'. This is a required property as the default is undefined.

So basically your callback will be your localhost kinda thing, where the server will get data from. If you have let's say on a Repl in Repl.it, then it will have to get the data from the Repl hosting URL

Related