New to using the YouTube API/data scraping in general, and I was wondering exactly what the authentication for the statistics.dislikeCount() in the Videos section entails? Does it mean that we would have to obtain consent for each channel for which we want to view the dislike count individually? How would one go about doing so?
statistics.dislikeCount
unsigned long
Note: The statistics.dislikeCount property was made private as of December 13,
2021. This means that the property is included in an API response only if the API request was authenticated by the video owner. See the
revision history for more information.
The number of users who have indicated that they disliked the video.
Blockquote
Source: videos#statistics.dislikeCount
So it's not just about consent as far as I understand, you have to be the owner of the YouTube channel to be able to retrieve the dislikes of its videos.
Related
Hi I want to attract the last 30 day views of the channels with youtube apis but somehow I could not. Does anyone have an idea?
I've tried it with Youtube Analytics api, but it only values "channel == mine". that is not.
YouTube analytics Data is private data. Inorder to see the data for a channel you must be authenticated as the owner of that channel.
YouTube authorization is also channel based if you are having issues seeing one of your channels logout of your application and authenticate it again make sure to select the proper channel when promoted
Can any one help me to find the user id / email for this Youtube Channel.
I don't have any programming background.
https://www.youtube.com/channel/UCGS6tPWTNYLy04JSFUrT7ew
No you won't be able to in new API v3 documentation explains
The biggest takeaway for developers using the older Data API v2 is
that you must be aware that not every YouTube channel has a unique
username. Fortunately, every YouTube channel is guaranteed to have a
unique channel ID associated with it, represented by the value in the
tag, and that’s the value that we recommend developers
use instead of usernames. For instance, if you have a database that
maps YouTube usernames to information about that channel, your older
entries should continue to work. (Existing channels won’t lose their
usernames.) However, as time goes on, it will become more and more
likely that you’ll have to work with channels that can’t be uniquely
identified by a username.
A channel doesn't have an email address associated to it you can see that by checking the Channel resource. If you are authenticated with a user and you can use the token info end point to get info about the user
https://www.googleapis.com/oauth2/v3/tokeninfo?id_token=XYZ123
You can also go though the people api
https://developers.google.com/people/api/rest/v1/people/get
For both those calls you must be authenticated. You cant get email for a user who you dont have access to
All the related SO questions and answers say to use the playlist ID returned in the contentDetails.relatedPlaylists.watchHistory returned by the youtube.channels.list endpoint. That value now always seems to be set to "HL". I'm using an OAuth token to authenticate the request. Is there another way to get the list of recently watched videoes for the authenticated user? I also noticed that the list of watched videos no longer appears on the user's YouTube home page, just recommended videoes. Am I just SOL or is there some new way to access the watch history?
I want to know how can I do auto subcribe an account with youtube api v3. Can I it to register with youtube account. For example, some script do auto post share on your twitter account.
I do not personally use YouTube API, but after looking over the YouTube Data API's documenation pages, it seems that the API supports a method to subscribe users to a channel.
The API Overview documentation page states:
A subscription resource contains information about a YouTube user subscription. A subscription notifies a user when new videos are added to a channel or when another user takes one of several actions on YouTube, such as uploading a video, rating a video, or commenting on a video.
You may view all the methods supported by the subscription resource on the subscription resource's documentation page. The method that you would need is called insert. This allows you to automatically subscribe an authenticated user to a specified channel. The insert method's description can be found on its page along with detailed usage examples. The page provides examples in Apps Script, Java, PHP, Python, and Ruby; however this method can be used any programming language which supports the YouTube Data API Client Libraries.
I'm new to the YouTube Analytics API, and had a couple of questions:
In order to retrieve Analytics reports, I have to specify the channel ID for the "ids" parameter. How do I find the channel ID for the OAuth-authenticated user? I saw in the Sample Application that I can call Channels.list method in the Data API (V3) and use the "mine=true" parameter. Is this guaranteed to return a single channel? If not, how do I know which channel is the right one? What's the recommended way of finding a user's channel ID?
Once I have the channel ID, I can begin querying for Analytics data. I'd like to query the "views" metric for the channel for the entire history of that channel. The question is, how do I know how far back to query? Is there a channel start date? The Channels.list method mentioned above doesn't return the snippet.publishedAt date for my channel so that doesn't seem to be a reliable way. How else do I know when to stop? I guess I could query back until 2005 or so when YouTube was founded but that seems like a bad approach. Any suggestions?
The Analytics API supports reports for channels as well as content owners. Once a user authenticates via OAuth, how do I know if that account is a regular YouTube account vs a CMS content owner account?
Any help would be greatly appreciated!
The recommended approach is to do a channels.list(mine=true). The first result returned will be the channel corresponding to the currently authorized user. (channels.list() returns a list of channels because there are other combinations of request parameters that could result in more than one channel being returned.)
Going back to some arbitrary date in the past should be harmless. 2005, 2000, etc. The YouTube Analytics backend should know how to properly deal with that, and you'll obviously only get stats that date back to the first views associated with your channel.
The value of the ids= parameter tells the API whether you want to do a report against a channel associated with the current authorized user (ids=channel==UC...) or against channels/videos that you have access to as a CMS content owner (ids=contentOwner==CONTENT_OWNER_NAME).