Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3720

Uploading a video to my YouTube account using YouTube API without requesting users permission

$
0
0

I am new with the YouTube API and I am trying to upload a recorded video from a website to my YouTube account through PHP. My issue seems to be with the OAuth acceptance to get a valid Access Token. What I want is for the site/server to authorise the request to upload to my YouTube channel, as opposed to get permission from the user to access their YouTube account, as they do not need to give any access to their account.

What I've tried:

  • I've tried sending the request using an API Key but that just comes back with an error saying OAuth is expected.

  • When using OAuth, it is prompting the user to allow the site to have access to manage their YouTube account, when I only want the site to access my account automatically. (The code for this was taken from https://developers.google.com/youtube/v3/docs/videos/insert -> Show Code -> PHP)

  • I have generated an Access Token using https://developers.google.com/oauthplayground/, and if I use the Access Token from there directly in my code (same as above, just replacing 'setAccessToken' to the string I get from OAuth Playground), it works as expected, however the token expires and then no longer works.

Any help or guidance on this would be appreciated, thanks.


Viewing all articles
Browse latest Browse all 3720

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>