1

I have a web application wherein I want to allow specific users, admins of the site, to upload videos through my app to my own youtube channel. I don't want to give them my account credentials, but authorize them to upload videos on my channel. I am really stuck here.

What I have tried -

  1. Tried a service account, and later found out that Youtube API doesn't support service accounts. It just throws Error 401 - Unauthorized.

  2. I can save the refresh token after one-time authorization, but the problem is my app will be deployed on EC2 server and there's really not an option of opening something in a browser, so I won't be able to authorize anything on the server.

  3. Through the help of OAuth Playground, I got a refresh token which I used as a hardcoded value and it worked fine, but I really am looking for a better solution than this, this is my last resort.

Any help regarding this will be appreciated. Thanks!

Akshansh Jain
  • 297
  • 1
  • 5
  • 19
  • 2
    2. create a refresh token localy on your own machine then upload it to the server. there is really no better option – Linda Lawton - DaImTo Nov 14 '17 at 14:58
  • See also https://stackoverflow.com/questions/18641250/does-google-oauth2-0-support-an-oauth-flow-for-a-resource-owner-password-credent – paolo Nov 14 '17 at 22:20
  • If you don't want to manually upload a token, you could also create a small client-side app that does the routine of obtaining and uploading the token for you. – paolo Nov 14 '17 at 22:21

0 Answers0