We would like to show YouTube videos on our 1in52.com website, and to maintain control over the organization of videos. This is research into the options that YouTube provides.
Data API Getting Started Checklist
- Register your application. Done.
- Go to the dev console.
- Create a new project.
- Turn on the YouTube Data API v3
- Choose the appropriate credentials (OAuth 2.0, to access private user data, Service Account, to obviate user consent)
- Save the JSON key in a safe place (super secret USB drive).
- Familiarize yourself with the core concepts of JSON. Done.
- Read the Getting Started with the YouTube Data API.
- Optional – Read the authentication guide (e.g. for ratings, uploads, etc)
- Consult the API reference guide for resource, method, and property descriptions.
- See also: https://developers.google.com/youtube/v3/?hl=fr
- there are pretty diagrams here: https://developers.google.com/accounts/docs/OAuth2
- for applications that request private user data
- the HTTP request sends client ID and optional client secret to obtain a token
- web application – basically, we access the Data API through a YouTube end-user’s account
- if server-side, then we must supply authorized redirect URLs
- service account – basically, we access the Data API through a service account not a YouTube end-user account
- an application (call it serviceApp)
- that calls an API (e.g. that calls the YouTube API)
- on behalf of another application (call it clientApp)
- clientApp –> serviceApp –> YouTube Data API
- neither the clientApp nor the serviceApp has access private user information
- the serviceApp must must prove its identity to the Data API
- the most important advantage is that there is NO USER LOGIN AND CONSENT
- installed application - this is for desktop or mobile apps that run in Windows, iOS, and Android, for instance.
- for applications that do NOT request private user data
- they key just identifies our project, so that Google can keep stats on it
Some of the YouTube API options that we considered include:
Player, Player APIs, and Player Tools
- players are <iframe> or <object> tags
- all players must be at least 200px by 200px
- IFrame Player API – control a player embedded in an iFrame
- contains player controls
- add a player to the website
- show individual videos or a playlist
- customize it with player parameters (e.g. autoplay)
- player with no controls
- lets you create your own player controls
- customize it with the Player APIs
YouTube Data API
- perform most operations a normal YouTube user can on the YouTube website
- this is for server-side logic
- allows for deep integration with YouTube
- operations include
- search for videos
- retrieve standard feeds
- see related content
- upload videos
- modify playlists
- rate and comment on videos
YouTube Live Streaming API
- manage live events on YouTube as they happen
The API Overview Guide provides the following table:
|Basic||Player APIs with embedded player|
|Medium||Player APIs with chromeless player|
|Advanced||Data API and Player APIs with chromeless player|