How do I mark a video as watched with Youtube API v3? - youtube-api

I have a C# program I wrote using the Youtube API V3 that manages my channel's videos.
I already have all the OAuth 2.0 stuff sorted out and I'm looking for a way to tell Youtube that the authenticated account watched the video.
The reason being that I use the "watched" feature to determine which of the videos in my feed is the last one I actually watched.
Is there a way to do that?
Or is it purposefully not in the API because it messes with the view count?
Of course I checked Google and Google's API reference first, didn't find anything.

Related

Get rental price from YouTube Data API

I'm currently using the YouTube Data API v3 for videos and I'd like to get pricing information from the API. I couldn't find anything regarding that in the API. Is there another API for this kind of information that I'm not aware of or some undocumented parameter?
Here's an example request to get information about a movie that can be rented and bought on YouTube:
https://www.googleapis.com/youtube/v3/videos?key=API_KEY_HERE&part=snippet&id=wz43PZMOrAM
There's a price visible on the site itself but no trace of it in the API:
https://www.youtube.com/watch?v=wz43PZMOrAM&app=desktop
Thanks!
This is beyond the Youtube Data API's scope. You can't fetch that information using the Youtube API yet.

Is there a Youtube API endpoint to set sharing on a video within an organization?

I'm working on an app that uploads private videos to Youtube to be viewed by everyone at our organization. Luckily, Google and Youtube have an awesome company-wide permission for this, which allows for anyone with an email address within the company to view these videos.
Youtube has 3 options for video privacy status: Public, Unlisted and Private. I'd usually just go with Unlisted and call it a day, but due to the nature of these videos, I'd prefer for them to Private, then manually grant access to the video and share it with everyone at the organization. When done through the Youtube Video Manager page, here is the dialog box I'm looking for an API endpoint for:
Manual Approach
We can go through each video and check this box in each video, but that's not something that scales well. I'd love to find documentation on a Youtube API endpoint that handles this. There's a clear status.privacyStatus attribute for videos that can be set to private, public or unlisted, but nothing for this.
Does anyone know of a Youtube API andpoint to control this permission for private videos on Youtube?
I can back up the assumption from my comment that private video sharing is not possible through the Data API v3 with this article I found on the topic.
The author of the article even provides a workaround to this problem, although I strongly discourage using it, since it requires parsing sensitive account information (password) in PHP. Apart from that, the code is from 2010 and will most likely not work anymore because it is from before YouTube channels were linked to Google+ pages.

How can I use the deprecated YouTube Data API to get video comments?

I have an application where we would like to display YouTube video comments. In the YouTube API 2 there was support for retrieving video comments - this functionality is no longer available in API 3.
As stated in the docs:
You can continue using the v2 API for comments and uploading video
captions for now, and we'll be adding this functionality into the v3
API soon. While we don’t have specific dates yet, we will release that
functionality so that developers have as much time as possible to
migrate to v3.
...there
will not be 100% feature parity between the v2 and v3 APIs. Please see
the v3 API documentation for more details as to what functionality is
supported in v3.
As I understand it, you need to register your app through the Google Developer console for the API you wish to use first, and there is no longer an option to add YouTube API 2. I tried sending a request to the old endpoint
https://gdata.youtube.com/feeds/api/videos/VideoIdHere/comments
but got the following response
No longer available
Is there a way I can still use the API 2 to retrieve video comments? How can I accomplish this?
Edit:
YouTube video comments are now available at the following endpoint
https://www.googleapis.com/youtube/v3/commentThreads
See the docs here
Nope, API v2 is completely deprecated and no longer available. You will need to use API v3.
Example call: https://www.googleapis.com/youtube/v3/commentThreads?part=snippet%2C+replies&maxResults=50&videoId=VIDEO_ID&order=time&textFormat=plainText&key=API_KEY

How to fetch videos by geolocation with the Youtube API v3?

This maps api answer says
Please note you can also use the YouTube API to fetch geolocated
videos to create your own customized YouTube Layer, with filters and
so forth.
http://code.google.com/p/gmaps-api-issues/issues/detail?id=3204#c9
Which API request can be used to fetch videos by location? I checked the docs, but I cannot find it.
I believe this: https://developers.google.com/youtube/2.0/developers_guide_protocol#locationsp is what you were talking about, note how it says "Not working. This API parameter is temporarily disabled. See the API issue tracker for more information."
Edit: According to https://code.google.com/p/gdata-issues/issues/detail?id=4234 it will be fixed "In the second half of 2013"

Youtube Related Videos using Youtube V3 API

I need the API URL for Youtube Related Videos using the Youtube V3 API.
But I couldn't find the direct API call, like it is in Version 2. Did I miss something?
https://developers.google.com/youtube/v3/docs/
Are you trying to find videos related to a video?
You can use search->list call for this with specifying the "relatedToVideoId"
And for anyone looking for a coded example:
GET https://www.googleapis.com/youtube/v3/search?part=snippet&relatedToVideoId=5rOiW_xY-kc&type=video&key={YOUR_API_KEY}

Resources