Skip to main content

Prerequisites

The connector should already be set up, with a Connector Profile and a Linked Account. See Getting Started on the YouTube connector page.

Automatic subscription

StackOne subscribes to your channel’s video notifications automatically when the account is connected, and unsubscribes when the account is disconnected. YouTube sends them through Google’s WebSub hub, so you don’t need to set anything up in YouTube or the Google Cloud Console.

1

Select events in StackOne

Enable the webhook events you want on the YouTube connector in StackOne. StackOne subscribes the video feed of the channel that belongs to the connected Google account.

2

Check scope requirements

StackOne looks up the account’s channel with the YouTube Data API, which needs read access. The connector’s default scopes cover it. If you set narrower scopes on the StackOne Connector profile, include at least one of these:

  • https://www.googleapis.com/auth/youtube.readonly
  • https://www.googleapis.com/auth/youtube
  • https://www.googleapis.com/auth/youtube.force-ssl
3

Renew an expired subscription

The subscription stops when its lease ends. Reconnect the account in StackOne Hub, or change its enabled events, to subscribe again.

Available webhook events

The following YouTube event can be enabled. One subscription to the channel’s video feed covers it.

1

Video events

Events for videos on the connected account’s channel.

  • Feed Changed (feed.changed) — Fired when the channel’s video feed changes, which happens when the channel uploads a new video, changes a video’s title or description, or deletes a video. The data is the notification as YouTube sent it: a deletion carries a deleted-entry instead of an entry. YouTube sends the same notification for an upload and an edit, so the event does not say which of those two happened.

Delivery format

Details of how YouTube delivers events to StackOne.

1

One channel per account

Notifications cover every video on the channel that belongs to the connected Google account. If the account manages several channels, only the first channel the YouTube Data API returns is subscribed.

2

Event ID and repeated notifications

The event ID is the video ID, so every event about the same video, including its deletion, carries the same event ID. YouTube can send more than one notification for a single change, so expect repeated events for the same video.

3

Changes not covered

The feed only covers public videos, so changes to private videos send nothing. YouTube also sends nothing for comments, live streams or playlists.

Verify

Your Connector should now be able to receive and process events. Try triggering an event and you should see an Event appear in the Connector logs.