Click here to see your recently viewed pages and most viewed pages.
Hide

YouTube API v2.0 – Authorization for Flash Applications

Note: The YouTube Data API (v2) has been officially deprecated as of March 4, 2014. Please refer to our deprecation policy for more information. Please use the YouTube Data API (v3) for new integrations and migrate applications still using the v2 API to the v3 API as well.

As shown in the examples throughout this documentation, different API operations are executed using either GET, POST, PUT, PATCH, or DELETE requests. However, Flash applications must send a POST request in order to set an Authorization header.

To send an authorized GET, PUT, PATCH, or DELETE request from a Flash application, set the X-HTTP-Method-Override header in that request. If your application is sending a GET request, it should set the body of the request to the query parameters associated with that request as shown in the following example:

POST /feeds/api/videos HTTP/1.1
X-HTTP-Method-Override: GET
Host: gdata.youtube.com
Content-Type: application/atom+xml
Content-Length: CONTENT_LENGTH
Authorization: Bearer ACCESS_TOKEN
GData-Version: 2
X-GData-Key: key=DEVELOPER_KEY

vq=jesse+ventura&category=News

If your application is submitting a POST or PUT request, it should set the body of the request to an XML document. The XML formats for different types of requests are defined in later sections of this documentation.

pagination links

« Previous
OAuth 2.0
Next »
Understanding Video Feeds and Entries