I\'m implementing a service that automatically uploads videos to a YouTube channel once they are uploaded on a different server.
When I first started I was using Cli
You can do so by getting a refresh token from OAuth2 Playground and setting it in your youtube object.
Here it explains a little more.
And a step by step video.