I have code that will "like" a video through the YouTube API v3. At first, my code was throwing a 403 Forbidden error, and I tracked this down to the fact that my youtube account did not have a channel associated with it. I created a channel by going to youtube.com, and clicking the "add to" link underneath a video. A popup came up that said "Set up your channel to create your playlist on YouTube". As soon as I filled out that form, and clicked continue, the code stopped returning a 403, and started working.
Is there anyway to "like" a video without having to go through this channel setup process? Or if not, is there any way to tell if a user does not have a channel on their account, and prompt them to set it up if needed?
For reference, my code is written in python and is based off of the example here:
https://developers.google.com/youtube/v3/docs/playlistItems/insert
Thanks,
Josh
Edit: There's now a channel.status.isLinked property which will reliably tell you whether a channel resource is "linked" in v3.
That being said, it is possible to like a video using the YouTube.com web interface for an account that doesn't have a channel, and I also believe that it was possible using v2.1 of the legacy GData API. The fact that you can't do that in v3 sounds like a bug to me, and I'll escalate that internally.
Related
I'm using youtube v3 API to publish videos on my channel. I want to moderate all comments made on my videos so I've selected the following in my channel setting. Note that I've chosen for all comments to be held for review by default.
Now I proceed to publish a video via API. But, it was observed that my video settings were set to Allow all comments instead of Hold all comments for review as is evident from the below image.
I've gone through the video insert API and did not find any parameter that would configure comment settings for each video. I'm failing to understand why the channel default setting is not selected for videos published via API. Is there any way through which I can change the video comment setting via API?
There is no way to specify comment options via the Data v3 API. This has been a long standing feature request. See the IssueTracker thread.
I currently working on a project where I send a youtube video id and show it to the user. And I want to know if there are a method to know when the video is completely viewed by the user. In my application's client, I send a response to the server when the view is completed, and I want to prevent receiving falsed data from untrusted user. And that's why I want to know if youtube api make a things like that. I have seen other similar topics, but I haven't found a safe way to secure communication between client and server for this problem.
Thank you.
From this SO post, it was mentioned that you can use onStateChange event to log that a user viewed a video. But the general idea here is about safety which I think is more important, from there I don't think you can do this as per the privacy of a user. You can understand more about YouTube Reporting and Analytics here.
I use Yt gem to work with Youtube API and upload video using Yt::Account class.
The problem is that I need to allow user to choose channel to upload to – for example, one user has a second channel related to Google Plus page and this user should be able to upload video to that Youtube channel, not user's default one.
It seems like Yt misses the ability to specify channel (or I missed something).
I found also examples from Google https://developers.google.com/youtube/v3/code_samples/ruby but all it says is "upload a video to the channel associated with the request" – and nothing about how to associate different channel.
Any help is appreciated
I am trying to add some youtube videos from my Admin page to database. So that mobile application can make use of them to play.
I want to filter the result from YouTube API link so that i can make sure that whatever videos i add to the database will be able to play on mobile devices like IOS and Android.
I tried
&format=5 and &format=1
but no use.
I also went through Youtube API v2.0 Docs but unable to find the correct way to assign fields parameter to my query string
can anyone guide me to fix this?
What you need is videoEmbeddable and videoSyndicated.
Here's my answer to original question: retrive only mobile-supported video from YouTube API
Is it possible to add to my youtube account a video I liked in youtube without having to upload it?
This is for an application i´m developing... I´m looking for something similar to share on twitter feature.
But any help is welcome!
Thanks
You can add it as a favourite, as Yuliy has said, or you can create yourself a channel, add a playlist to that channel, then add the video in a similar way to the playlist.
Doing it this way means you can 'see' it from the API(getplaylists, getplaylist)... But, if the original author decides to take the video down, then of course it will disappear from your channel page as well (or more likely say 'this video has been removed by the user').
You cant keep a 'copy' of the video like this.