What can I build using YouTube's Data API?
The YouTube Data API (also known as the YouTube Custom App API) is a powerful tool that enables developers to build applications that interact with YouTube's platform. With it, developers can create apps that display data about the videos and channels on YouTube, fetch metadata about specific videos, modify existing videos, and much more.
Some of the many possibilities enabled by the YouTube Data API include:
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
youtube_data_api_custom_app: {
type: "app",
app: "youtube_data_api_custom_app",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://www.googleapis.com/oauth2/v1/userinfo`,
headers: {
Authorization: `Bearer ${this.youtube_data_api_custom_app.$auth.oauth_access_token}`,
},
})
},
})
Emit new event for each new comment or reply posted to a Youtube video.
Emit new event for each new Youtube video liked by the authenticated user
Emit new event for each new Youtube subscriber to user Channel.
Emit new event for each new subscription from authenticated user.
Emit new event for each new Youtube video the user posts.
Adds resources to a playlist. See the docs for more information
Returns statistics from my YouTube Channel or by id. See the docs for more information
Creates a new top-level comment in a video. See the docs for more information
Creates a playlist. See the docs for more information
Deletes a playlist. See the docs for more information
YouTube (Data API) - Custom App uses OAuth authentication. When you connect your YouTube (Data API) - Custom App account, Pipedream will open a popup window where you can sign into YouTube (Data API) - Custom App and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any YouTube (Data API) - Custom App API.
Pipedream requests the following authorization scopes when you connect your account:
email
profile
https://www.googleapis.com/auth/youtube.readonly
https://www.googleapis.com/auth/youtube.upload
https://www.googleapis.com/auth/youtube
https://www.googleapis.com/auth/youtube.force-ssl
GET
https://accounts.google.com/o/oauth2/v2/auth
?
client_id={{custom_fields.client_id}}
&
redirect_uri={{oauth.redirect_uri}}
&
state={{oauth.state}}
&
response_type=code
&
scope={{oauth.space_separated_scopes}}
&
access_type=offline
&
prompt=consent
POST
https://oauth2.googleapis.com/token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{custom_fields.client_id}}
&
client_secret={{custom_fields.client_secret}}
&
redirect_uri={{oauth.redirect_uri}}
&
grant_type=authorization_code
&
code={{oauth.code}}
POST
https://oauth2.googleapis.com/token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{custom_fields.client_id}}
&
client_secret={{custom_fields.client_secret}}
&
grant_type=refresh_token
&
refresh_token={{oauth.refresh_token}}