Revision History

November 17, 2020

This update contains the following changes:

  • Examples and information related to paid channels have been removed from the documentation. See the YouTube Help Center for more details.

October 20, 2016

This update contains the following changes:

  • The Subscribe Button has been updated so that users do not subscribe to or unsubscribe from a channel just by clicking on a button. Now, when a user clicks on a button, the channel page associated with that button opens in a new window.

    • If the user was not previously subscribed to the channel, the page displays a confirmation dialog so that the user can verify the intent to subscribe to the channel.
    • If the user was already subscribed to the channel, the user can unsubscribe from the channel page.
  • The Subscribe Button no longer fires an event when a user clicks the button to subscribe to or unsubscribe from a channel. (The button had supported subscribe and unsubscribe events.) The data-ytonevent attribute, which could previously be used to specify an event listener, has also been deprecated.

    In light of this change, the gapi.ytsubscribe.render method no longer supports the onytevent option, which could previously be used to specify an event listener.

August 11, 2016

This update contains the following changes:

  • The newly published YouTube API Services Terms of Service ("the Updated Terms"), discussed in detail on the YouTube Engineering and Developers Blog, provides a rich set of updates to the current Terms of Service. In addition to the Updated Terms, which will go into effect as of February 10, 2017, this update includes several supporting documents to help explain the policies that developers must follow.

    The full set of new documents is described in the revision history for the Updated Terms. In addition, future changes to the Updated Terms or to those supporting documents will also be explained in that revision history. You can subscribe to an RSS feed listing changes in that revision history from a link in that document.

December 18, 2015

European Union (EU) laws require that certain disclosures must be given to and consents obtained from end users in the EU. Therefore, for end users in the European Union, you must comply with the EU User Consent Policy. We have added a notice of this requirement in our YouTube API Terms of Service.

November 22, 2013

This update contains the following changes:

  • The JavaScript file that you should load to add your own button has changed to https://apis.google.com/js/platform.js. The old file, https://apis.google.com/js/plusone.js will still be supported, but the new file is more efficient.

  • The subscription button attributes section now explains how to use the data-count attribute to specify whether a Subscribe Button should show the associated channel's subscriber count. The configuration options section also now shows sample buttons that show and hide the subscriber count. Finally the tool for configuring your own button also supports this setting.

  • The Subscribe Button now fires events when a user clicks the button to subscribe to a channel or unsubscribe from a channel. The new Handling events section explains how to identify a JavaScript function that listens for these events. The subscription button attributes section also explains the new data-onytevent attribute that you use to identify the event listener.

    In addition, the tool that lets you configure your own button now includes an option to indicate that you want to handle these events. When that option is selected, the button code includes a sample JavaScript function for you to modify.