Query to find "live" videos via YouTube API only works with an unrestricted API key. Is my query wrong or am I using the wrong API library? - youtube-data-api

I am trying to write a program that queries the livestream API to see if specific channels are currently live. I am using API key auth. The query looks like this:
/youtube/v3/search?part=snippet&channelId={channelID}&type=video&eventType=live&key={key}
This query works as long as the key is unrestricted. It returns a video item if the Channel is live. When I try to restrict the key to the "YouTube Data API V3" library, it does not work. No video items are returned for channels that are live.
In the documentation the livestream API looks like it falls under the Data API library, so I assumed restricting to the Data API library would still work. I cannot find a standalone livestream API library to add to the key via the developer console.
I am wondering if I am using the wrong type of query, or if there is a separate library I should be using to query the livestream API?

Related

How to get membership related information by using YoutubeDataAPI

I want to use the Youtube API to determine if a video is membership-only or not.
I tried to find out the actual video information using YoutubeAPI's videos, channels, playlists, etc., but it doesn't seem to contain any information related to membership.
Is there any good idea?
One more time YouTube Data API v3 doesn't provide a basic feature.
I would suggest you to use my open-source YouTube operational API, indeed by requesting https://yt.lemnoslife.com/videos?part=isMemberOnly&id=VIDEO_ID you would get a JSON with the boolean value interesting you in item['isMemberOnly'].

Getting statistics from Google DV360 campaign via API

I'm trying to use google API to get reports on campaigns/ads that are created in Display & Video 360.
Fetching information about them requires https://www.googleapis.com/auth/display-video scope for my access token. However, it looks like getting reports is only possible through creating/running queries, which are part of Double Click Bid Manager, so I need to additionally enable this API and request https://www.googleapis.com/auth/doubleclickbidmanager scope.
Is my understanding correct? It seems strange because I can view reports in DV360 web interface.

How to use OnBehalfOfContentOwner field while using youtube data API insert request?

Context :
I am trying to upload videos to a youtube channel(Other-Y) linked to a google cloud project(say X).
I am not the owner of the channel. However, I have the manager access. I have client secret keys with me.
Steps followed :
Generate refresh token using these gcp secret keys and with my own personal email(this email is linked to the gcp account).I am using oauth credentials.
Now, while uploading, the video is getting uploaded to my own personal channel and not to the channel I am managing.
I have read about the OnBehalfOfContentOwner field and am trying to use that.
Questions :
Is this upload possible using OnBehalfOfContentOwner field ?
If yes, is there a way to know the exact value to be passed here ? Should it be user id of the channel owner in the youtube UI ?
Also, please let me know if there are any specific golang references for the same.
Thanks !

List all Play subscriptions

Is there any API or script to get back a list of all live Google Play subscriptions for a given app? ie a data form of what's shown on the Play developer console under Subscriptions.
Stripe, for example, has an explicit list subscriptions API, but I can't find the equivalent for Play.
UPDATE: Since writing this, I've enquired to official sources and I can confirm there is indeed no API to retrieve all of your subscriptions. Certainly surprising, but that's where it stands.
As described in the documentation on the device you can use the getPurchases() method returns live subscriptions.
On the server there is the Google Developer API Purchases.subscriptions REST Object.

Activities API call not returning correct results

The below api call used to return a feed of results that would have been on my homepage.
https://content.googleapis.com/youtube/v3/activities?home=true&maxResults=50&part=id%2Csnippet%2CcontentDetails&key=AIzaSyC0wL6aecu2rxiTNtW8uvtnb1kx9Kdlb4s
In the past day or so the feed I get has changed to be only videos from some channel called "Popular on YouTube".
Does anyone know why this API call changed? Is it a bug? Is there a different way to get an authenticated user's activity feed?
It turns out the home parameter for the activities api endpoint has been deprecated.
https://developers.google.com/youtube/v3/docs/activities/list
Sounds like you must have been using a shared API key.
Either case, "Popular on Youtube" is a Youtube channel by Youtube. Something has broken functionality and I believe it is referrer issue. With that, I suggest getting a new API Key.
You can learn more about and getting a free personal API Key, if you haven't done so. https://developers.google.com/youtube/v3/docs/errors

Resources