YouTube

Deprecated Features for YouTube API v2.0

The YouTube API features listed below have been deprecated. We recommend that you review their documentation for suggested alternatives and also that you are aware of the official deprecation dates for these features.

  • Authentication protocols

    • OAuth 1.0 – The OAuth protocol provides a standard way to access protected data on different websites. It is an open protocol that can be implemented on other websites. Your applications should use OAuth 2.0 authentication instead of OAuth 1.0.

    • AuthSub – Google's Authorization Proxy service, called AuthSub, enables a user to grant a web application access to services protected by the user's Google or Google Apps account without having to provide account login information to the application. Your applications should use OAuth 2.0 authentication instead of AuthSub.

    • ClientLogin – The ClientLogin authorization method lets installed applications exchange information with Google services protected by a user's Google or Google Apps account. Your applications should use OAuth 2.0 authentication instead of ClientLogin.

  • Other features

    • Associating an unlinked Google Account with a YouTube channel

      To upgrade an unlinked Google Account so that it is associated with a YouTube username (and channel), update the user's profile by sending a PUT request to the following URL. Note that your request must provide an authentication token that identifies the user.

      https://gdata.youtube.com/feeds/api/users/default?v=2.1

      The body of the request is an Atom entry that uses the <yt:username> tag to specify the YouTube channel name that the user would like to have. We recommend that you use the username suggestions feed to ensure that the name that the user wants is, in fact, available.

      The sample request below demonstrates how to create a new YouTube channel and associate it with an unlinked Google Account:

      PUT /feeds/api/users/default HTTP/1.1
      Host: gdata.youtube.com
      Content-Type: application/atom+xml
      Authorization: Bearer ACCESS_TOKEN
      X-GData-Key: key=DEVELOPER_KEY
      
      <entry xmlns='http://www.w3.org/2005/Atom'
             xmlns:yt='http://gdata.youtube.com/schemas/2007'>
        <yt:username>RequestedUsername</yt:username>
      </entry>
      

      The API will return a 200 (OK) HTTP response code if your request is successful. The following errors will also generate an HTTP error response code:

      • If your request does not specify a <yt:username> value, the API returns a 400 (Bad Request) HTTP response code.
      • If your request specifies a <yt:username> value that is already used by another YouTube user, the API returns a 400 (Bad Request) HTTP response code.
      • If your request does not specify an authentication token, the API returns a 401 (Unauthorized) HTTP response code.
      • If the authentication token provided with your request does not identify an unlinked Google Account, the API returns a 403 (Forbidden) HTTP response code.
    • Retrieving YouTube username suggestions

      Before upgrading an unlinked Google Account to associate it with a YouTube channel, you can retrieve a list of unused YouTube usernames that are based on a user-provided hint. To do so, send a GET request to the following URL, using the hint parameter to specify a value that should be used to generate the username suggestions. For example, the hint could be the user's first and last name or the username component of the user's email address.

      https://gdata.youtube.com/feeds/api/suggest/username?hint=John+Doe

      Note: An API request to retrieve username suggestions must specify your developer key.

      The API will return an Atom feed in which each entry's title tag contains a suggested YouTube username. We recommend that when retrieving this feed, you set the fields parameter value to entry/title, which restricts the response so that it only includes the information that you need.

      The sample feed below shows suggested usernames based on the hint value of SirCodeALot, which appears to be taken based on the suggestions. The request URL for this feed is:

      https://gdata.youtube.com/feeds/api/suggest/username?hint=SirCodeALot&v=2&fields=entry/title

      The API response is:

      <?xml version='1.0' encoding='UTF-8'?>
      <feed xmlns='http://www.w3.org/2005/Atom'>
        <entry>
          <title>SirALotCode</title>
        </entry>
        <entry>
          <title>CodeSirALot</title>
        </entry>
        <entry>
          <title>CodeALotSir</title>
        </entry>
        <entry>
          <title>ALotSirCode</title>
        </entry>
        <entry>
          <title>SirCodeALot1</title>
        </entry>
        <entry>
          <title>ALotCode</title>
        </entry>
        <entry>
          <title>ALotCodeSir</title>
        </entry>
      </feed>
      
pagination links

« Previous
Channel Branding Settings
Next »
OAuth 1.0

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.