I have a situation where I need to invite users to to be able to watch a private playlist on videos on Youtube.
I have found information about this at: Add or remove access to your YouTube channel
However that uses the user interface (Youtube page) and I'm looking for doing it in a programmatic way.
The best I found about managing channels is this: Implementation: Channels however there is nothing about invites and access removing.
Is there a way to invite users and and remove a user's permission using the YouTube API or a library?
Thanks.
No there is no way to add or remove permissions on channels though the YouTube Data api.
You might want to check though the issue log and see if anyone has already submitted a feature request for this. YouTube Issue forum.
Related
I am using the OAuth Functionality in a local Console Program to request the Videos for my Youtube Channel and upload Videos to Youtube.
For the Example which Google gives OAuth is used to authenticate to be able to retrieve the wanted data. But the Videos I am uploading keep getting put to private because my API Service is not verified.
Now I want to verify my API Service but I dont have a website for it so I can't provide any links for data security information or the main page of it. I mean it is a desktop app which only I am using and which is not meant to be publicly available.
How can I fulfill the verification process without any option to provide this informations?
private videos
If you check the top of the page for Videos: insert you will find that your videos are being uploaded private because your app has not been though a security audit.
app verification
In order to apply for app verification there are a number of urls that you need to supply
You will need to register a domain and claim it in web masters and then you will be able to add them.
If you want to be able to upload public videos via the YouTube Data api your app needs to be verified. In order to verify it you need to be able to show the TOS, privacy policy and the application home page. There is no way around this even if its a desktop app. Even if its single user you still need to do this.
I have a video which shows you what you need to know to verify your app.
What you need to know about Google verification in 2021.
I need to locate the user's YouTube account/channel Google user Id.
A Google Search on find YouTube channel from google id yields several StackeOverflow possible options, some use the Google+ API which has been deprecated, but I'm sure there are alternatives using the Google Identity API or some other Google API.
Can anyone give me idea or a solution about how can I convert Google Account Id to YouTube Channel Id Account?
You need to remember that YouTube and google where originally two different companies there is probably no direct link that you are going to be able to hack your way to.
This is partly why (IMO) YouTube login is channel based. A user can have more then one channel so your not going to be able to find a single channel for a user relation its going to be a one to many relation. I dont think google has any way for you to see this without having the user login.
Your best option will be to ask the user to sign in and then use channels.list with the option mine.
How can I verify whether a user has "YouTube Premium" account via YouTube Data API. I've gone through all the APIs listed in the reference, but couldn't find any.
https://developers.google.com/youtube/v3/docs/
The Youtube api is channel based. This means that all the information is about a specific channel there is no information about the user themselves. That information is not currently available in the YouTube api. You should consider submitting a featuer request to google requesting that they add this information to the api.
You can find the YouTube issue forum here. feature request
I'm trying to figure out wheter it is possible to have a private video on youtube that I could share with particular Google Accounts through API.
I would have a separate web application that would have a Google signup and after signup I would enable that Google Account to watch my private video.
Ideally I would also want to embed the video to the web application (but I think I can do this rather easily if I'm an owner of the video).
Ispossible to have a private video on YouTube that I could share with particular google accounts through API.
No you cant directly share a video with another user like you could a file on google drive.
You could show the video on your own site, but I am not sure its something I would want to try. The thing is being that its a private video you and you alone have access to see it. Your going to have to authenticate your application and get a refresh token back which will allow you to access the account and the videos on the account.
Then you will be able to use that refresh token to get an access token to show other people the video via your website. The problem you will have is if the refresh token stops working (rarely happens but can happen) you will have to authenticate it again before your solution will work.
Note: Service accounts don't work with YouTube API. So don't bother going down that road.
If you know the ID of a video, you can access it. You can share the ID,or an embedded link with someone.
The api only hides the info, not blocks it. So you would need to hold the info elsewhere for referencing.
So as long as you know the id's of the related video's, you can do what you want with them.
However, if you are wanting to monetise them on the side, I would recommend against it. Best to read the user agreement you have with YouTube.
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