API - Upload video in PHP to a specific Channel

2020-03-07 06:40发布

We're planning on using the YouTube API Data V3 to allow users to upload videos to our channel via PHP. My question is, what are the correct steps in allowing the video to be uploaded on a server, to our Channel? I though that is where the Server or possibly Browser key would come into play?

Currently, I'm able to upload the video, but after the user signs in, it get's uploaded to their Channel. Do we need to store the access token generated by account that we want all the videos to be uploaded to?

1条回答
等我变得足够好
2楼-- · 2020-03-07 07:15

You can actually save the refresh token once the account of your server signs in and reuse it in your code, rather than signing in a user every time.

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.

查看更多
登录 后发表回答