The goal of my task is to create a console script, which will insert recently uploaded videos on my own site to my own Youtube channel. I want to use server-to-server authentication but YoutubeApi does not support this way of authentication now.
So my question is: How could I upload video to youtube channel, using oauth2 authentication with console script without any help of a user? Is there any way to do this without using deprecated ClientLogin authentication protocol?
Yes 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.
After disc with YoutubeAPI developer, we got such solution: IT IS IMPOSSIBLE TO DO YOUR OWN SERVER-TO-SERVER APPLICATION WITHOUT USING DEPRECATED ** **ClientLogin Auth Protocol It will be fully deprecated on April, 2014 (but until April you can use it).
So, if you want your users to upload videos into your YT channel from your site, you should work in scheme like this: - Your users upload videos to your site - You (or somebody else who has your YT account credentials) import video to your YT channel To resolve this you can easily use OAuth2 Protocol.
here is a script to upload a video via curl
to make this work you will need to
this script is based on this other question
Moreover there is this github project which address the problem with python...
I have been able to upload a video to my channel on YouTube using the following shell script.
Refer to the previous answer for how to get your custom variable values.