Can I use OAuth 2.0 authorization in YouTube to au

2020-07-25 09:14发布

问题:

I am trying to implement a web service where videos that are uploaded to a server are then also uploaded to a specific YouTube account under my control (i.e. I have the access credentials). Since I have the username and password, it looks like I should just be able to use something like ClientLogin to gain the ability to upload videos to this account. However, this method is deprecated by Google and they recommended to use OAuth 2.0 instead. Given that this is new development I would prefer to use a non-deprecated api. Apparently though every OAuth 2.0 authentication method requires a user to supply the account credentials through a browser redirect to gain authentication. This is a server side program, I do not want user involvement, and the user does not have the account credentials anyway. This should be something Google thought of, so is there any way to do ClientLogin type authentication with OAuth 2.0? I want to be able to authenticate completely using OAuth 2.0 programmatically with no user involvement.

I have found this answer: Migrating from YouTube ClientLogin to OAuth 2.0 Migrating from YouTube ClientLogin to OAuth 2.0

However, authenticating as a device STILL requires account credentials input from a user through a browser, as far as I can tell. This answer is almost a year old by now, and does not fix the problem, so does anyone have any new ideas?

Thank you.

回答1:

In the web services user will need to authorize through the pop up window for the first time. Once he grants access to your app, he doesn't need to anymore.

In mobile devices, it's a pop up bar, they can just pick their already saved account.

As a short answer, there is no work around it, cause this is built to have a better level security.