> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stackone.com/llms.txt
> Use this file to discover all available pages before exploring further.

# YouTube Webhook Setup Guide

> Configure YouTube to deliver events to StackOne.

## Prerequisites

The connector should already be set up, with a Connector Profile and a Linked Account. See [Getting Started](/connectors/youtube#getting-started) on the YouTube connector page.

<section data-guide-section data-guide-scopes="">
  <h2>Automatic subscription</h2>

  <p>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.</p>

  <Steps>
    <Step title="Select events in StackOne">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>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.</p>
      </div>
    </Step>

    <Step title="Check scope requirements">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>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:</p>

        <ul>
          <li>`https://www.googleapis.com/auth/youtube.readonly`</li>
          <li>`https://www.googleapis.com/auth/youtube`</li>
          <li>`https://www.googleapis.com/auth/youtube.force-ssl`</li>
        </ul>
      </div>
    </Step>

    <Step title="Renew an expired subscription">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>The subscription stops when its lease ends. Reconnect the account in StackOne Hub, or change its enabled events, to subscribe again.</p>
      </div>
    </Step>
  </Steps>
</section>

<section data-guide-section data-guide-scopes="">
  <h2>Available webhook events</h2>

  <p>The following YouTube event can be enabled. One subscription to the channel's video feed covers it.</p>

  <Steps>
    <Step title="Video events">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Events for videos on the connected account's channel.</p>

        <ul>
          <li><strong>Feed Changed</strong> (`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.</li>
        </ul>
      </div>
    </Step>
  </Steps>
</section>

<section data-guide-section data-guide-scopes="">
  <h2>Delivery format</h2>

  <p>Details of how YouTube delivers events to StackOne.</p>

  <Steps>
    <Step title="One channel per account">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>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.</p>
      </div>
    </Step>

    <Step title="Event ID and repeated notifications">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>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.</p>
      </div>
    </Step>

    <Step title="Changes not covered">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>The feed only covers public videos, so changes to private videos send nothing. YouTube also sends nothing for comments, live streams or playlists.</p>
      </div>
    </Step>
  </Steps>
</section>

## 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.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.