Should I stop using google API V2? - oauth-2.0

I have an application for my client that uploads videos on youtube on behalf of my client.
What my client do is provide his user name and password in my app and then app uploads videos using Youtube DATA API V2(Username/password credentials).
But since username/password authentication mechanism is not available in V3, I have to change the user involvement that is required in the new Authorization mechanism. But my client is does not agree.
The question is, what if I continue to use API V2 and not switch to V3. Is there any chance that Google will stop V2 and I have to move to V3?
Is there any way I keep authenticating using credentials and not switch to OAuth 2.0?

You asked: Is there any chance that google will stop V2 and I have to move to V3?
Short answer: You need to switch to YouTube's v3 API.
From Google:
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.
If you haven’t yet migrated from the previous API version (v2), we wanted to remind you it will be unsupported as of April 20, 2015, and shut down soon thereafter. To make it fast and easy for you to migrate, check out the new Migration Guide. It’ll help you identify the v3 API methods and parameters that correspond to the functionality that you've been using in the v2 API. It also points out new features that the v3 API supports.
Source
Your second question: Is there any way I keep authenticating using credentials and not switch to OAuth 2.0? I do not know the answer to. Maybe ask as a separate question?

Related

Q: Youtube Data Api v3 - How to Increase Quota

I want to incease youtube data API V3 quota but their form "YouTube Data API Quota Extension Application" can not submit beacause it use captchar V1 (it needs using V2 but they didn't upgrade its in this form)
Pls help me, show me the way to send its. I found Youtube data API support but seem they are not existting.
The only way to ask for the quota increase is through the said form.
To deal with the recaptcha v2 upgrade, follow the instructions here.
If your site still uses reCAPTCHA v1, please upgrade to reCAPTCHA v2
immediately. We no longer support reCAPTCHA v1. Any calls to the v1
API will not work after March 31, 2018. Please register a new
key and upgrade to v2.

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

YouTube API from V2 to V3 migration

I'm still using old V2 api and now i get https://youtube.com/devicesupport.
My current request is:
https://gdata.youtube.com/feeds/api/users/{username}/uploads?alt=jsonc&max-results=15&v=2
There is no authentication required to make that call
Question:
Any idea how to achieve the same with new Google V3 API? I check documentation but didn't found answer for that.
I had the same problem with V3 api. I think you can't access videos informations without authentication anymore, but you don't need to use an OAuth to get a snippet from some video or search. I was searching a simple solution for my app, because I just want to request title, thumb and descriptions.
The new url will be:
https://www.googleapis.com/youtube/v3/videosid={VIDEO_ID}&part=snippet&key={YOU_API_KEY}
You need to access google developers console, enable youtube api and your public access key - on credentials (API KEY), so they can relate your app to all requests.
And I found this example in PHP if you need to parse JSON result:
http://www.leenooks.com/php/parsing-youtube-v3-json-with-php-examples.html
I'm still don't know all the limitations of V3, I was using V2 too, but maybe for uploads, or more control for youtube accounts you'll have to use OAuth.
I hope this will help you.

How to upload videos to Youtube with api key by V3 .NET

I have some issues with V2 (Error code 400) so I'm trying to move to Youtube Api V3 from V2.
I'm using C# and I've been searching how to upload videos to Youtube with api key on V3 .NET
Where can i find an example,explanation or a document for that?
https://developers.google.com/youtube/v3/code_samples/dotnet#upload_a_video
You need to go through OAuth2. If you are trying to upload into your own account, then this segment explains how to: https://developers.google.com/youtube/v3/guides/moving_to_oauth#standalone
Basically, you go through once and save the token from there.
If you even want to skip that one time as well, you can get a refresh token in OAuth2 Playground with respected scopes and plug it in directly in your code, with client secret and id. That way your script won't need a web browser.
Here's the video explaining this workflow step-by-step.

Accessing YouTube Data APi v2

When choosing APIs to access in the "Services" tab of the Google APIs Console, the only YouTube APIs listed are "YouTube Data API v3" and "YouTube Analytics API".
Does accessing the data api v3 allow me access to v2 as well? I need to use the comment functionality since I don't believe it's in v3.
Thanks!
For v2 of the data API, you'll still need to create a client ID/secret in the API console to do oAuth2 authentication, but when it comes to simple data calls, rather than getting an API key from that same console you will instead have to register your app and get an older developer key from the YouTube dashboard; you can do so here:
https://code.google.com/apis/youtube/dashboard
(also, you are correct that comments are not yet part of the v3 data API, so using v2 is the supported method to interact with that info).

Resources