Youtube API REST live stream NO RESULTS - youtube

Im try to get live streaming ID using API REST request. I try using API REST tool from google and im trying manually too and no result and i have an live streaming right now.
This is my channel https://www.youtube.com/channel/UC7Nfr13PyP84jWgU5FS9LGg
This is my api rest solicitude:
https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=UC7Nfr13PyP84jWgU5FS9LGg&eventType=live&type=video&key={KEY}
(im using real key)
This is my result: https://prnt.sc/p8qodg
Youtube api tool:
https://developers.google.com/youtube/v3/docs/search/list

Related

Youtube Reporting API OAuth in Azure Data Factory

Hi guys i'm pretty new to Azure Data Factory and i'm implementing a pipeline to retrieve stats about a YouTube channel through API and storing them in a SQL Database in order to connect it to some BI services.
Using Youtube DATA API i was able to:
retrieve all the videos uploaded in the channel - API Data - PlaylistItems
some summarized stats for each one API Data - Videos - with part:statistics
The next thing i'd like to do is retrieve detailed stats for each video on a monthly basis, i was able to do this with Google Apps Script on a Google Sheets using the Youtube Analytics and Reporting API API Call Reference
In Azure Data Factory i'm struggling with the Google OAuth, the Youtube DATA API supported the API Key authentication and that was pretty easy.
Instead the Youtube Analytics and Reporting API requires the OAuth and do not support services account so the only option i believe is the server-side flow Google OAuth server side flow
I believe is possible to do, in this link a user struggled with the JSON output of these API in Data Factory - 5
Do you think it is feasible and i'm going in the right direction?
Really appreciate any help!
Thanks

How do you get the past live streams with YouTube data API

YouTube Data API has:
https://developers.google.com/youtube/v3/docs/videos#snippet.liveBroadcastContent
but this shows whether you are already live streaming or there is a scheduled live stream.
And the YouTube livestream API doesn't seem to deal with non-LIVE entries:
https://developers.google.com/youtube/v3/live/docs/
Use
https://developers.google.com/youtube/v3/docs/videos#liveStreamingDetails
works with api_key unlike the fileDetails in the old answer.
OLD:
I was lucky and spotted that the past live streams are saved with file name livestream.str.
So, using the YouTube Data API to get videos with filename livestream.str should work.
To get this filename, you need the OAuth2 authorization. If you use the API key you will get 403 error. Then use the part=fileDetails:
https://developers.google.com/youtube/v3/docs/videos/list#parameters

How to get Youtube page's username Using Youtube API

I am trying to find the page's username through the Youtube API (******#pages.plusgoogle.com). I'm not getting this information through a request like: GET https://www.googleapis.com/youtube/v3/channels?part=snippet&mine=true
What should I do?
PS: I'm using the PHP Library.
Its not possible to get the /c/username or the /user/username via the YouTube API at this moment.

How to get Youtube video json list under an user via Google V3 API

In V2, I can use: http://gdata.youtube.com/feeds/api/videos/?alt=json&author=XXX
However, V2 has been deprecated and can not be used anymore.
What's the correct replacement in Google API V3?
You should get your API key (for server or for client).
http://code.google.com/apis/console#access
And use https://www.googleapis.com/youtube/v3/search?part=snippet&channelId={CHANNEL_ID}&key={YOUR_API_KEY}
https://developers.google.com/youtube/v3/docs/search/list
But, there are some bug reports about this API now.
https://code.google.com/p/gdata-issues/issues/detail?id=6598
https://code.google.com/p/gdata-issues/issues/detail?id=6599
https://code.google.com/p/gdata-issues/issues/detail?id=6600

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.

Resources