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.
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.
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.readonlyhttps://www.googleapis.com/auth/youtubehttps://www.googleapis.com/auth/youtube.force-ssl
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.
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 adeleted-entryinstead of anentry. 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.
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.
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.
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.