Create A Channel using Youtube API in .Net - youtube-api

The new youtube api (2.1 and 3.0) supports creating a channel for youtube if the google account is not linked to youtube
http://apiblog.youtube.com/2011/10/introducing-google-account-support-and.html
i am using C#, can any one hint me about how to do this?

There's no support for adding a YouTube channel to an unlinked Google Account in v3 of the API.
There is a v2.1 API call, but unfortunately the existing .NET GData client library doesn't have built-in support for that call, as you've noticed.
You can make the underlying HTTP PUT yourself using standard .NET HTTPWebRequest calls.
Alternatively, you can ask your users to go through the web-based flow starting with https://www.youtube.com/create_channel (or https://m.youtube.com/create_channel on mobile devices).

Related

Google Cloud / APIs: Quota Circumvention via multiple projects

I manage several projects, each project includes several API Clients (Android App, iOS App, PWA and backend server).
Glossary from yt API terms:
"API Client" means a website or software application (including a mobile application) developed by you that accesses or uses the YouTube API Services.
"API Project" means the project created in the Google Developer Console that is required for API Client(s) to access and use the YouTube API Services.
Following yt API terms I must create exactly one (1) API Project for that API Client. Those API Credentials are intended to be used exclusively by the associated API Client, which means that you must not use that one (1) API Project for multiple API Clients.. Then I understand that I should create one API Project for Android App, one more for iOS App, etc.
But I've recently received following email from Google:
We have recently detected your Google Cloud / APIs Projects have been circumventing our quota restrictions via multiple projects acting as one and appears to be violating YouTube API Terms of Service (III.D.1.c).
To fix the problem please delete all projects using YouTube API usage except for one project you wish to keep active
Then if I delete API Projects and keep a single one for all my API Clients, that means I should use one API Project for multiple API Clients, that is forbidden by terms.
What's the best way to follow ?

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

Should I stop using google API V2?

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?

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).

Google Reporting API with oauth 2.0

I want to use Google Reporting API to get the users' activity report (last login, etc).
My application is using oauth 2.0 to access other Google APIs. But it seems like Google Reporting API is not supporting oauth 2.0. Any suggestions how should I do it ? Implement oauth 1 or use different Google API (if it exists) to get users' activity report?
I think you are looking at the old documentation for the reporting API.
For the brand new reports API (https://developers.google.com/admin-sdk/reports/v1/guides/authorizing), it is encouraged to use OAuth 2.0.
Notice that the older API is called reporting API, but the new API that was just released at the IO is called reports API.

Resources