Grant Schwartz
Grant Schwartz

Reputation: 71

How to use YouTube data api without user interaction?

I am currently developing a server side web application which needs to upload a video present on the server to multiple YouTube channel. I have credentials of these accounts and have full access to them. I have read the documentation and in every flow user interaction is required. I want the complete authentication to happen at server side. Is this possible? If yes, how?

Upvotes: 4

Views: 620

Answers (1)

Linda Lawton - DaImTo
Linda Lawton - DaImTo

Reputation: 117146

Its not possible to do it without a one time user interaction, (which does not need to be part of your app). Service accounts don't work with YouTube API.

What you can do and what I have done in the past is authenticate your code once save the refresh token someplace. Then when you want to access it in your server sided script you use the refresh token to get a new access token and you have access. Drawback is keeping track of the refresh tokens and sometimes they stop working and you have to re-authenticate them again.

Upvotes: 4

Related Questions