PHP Youtube API v3 - Direct Upload - Unauthorized message

岁酱吖の 提交于 2019-12-05 14:47:18

It may looks trivial but did you created at least one channel in the account you want to upload the video to. I used almost the same workaround as you for the acceess_token then encountered the same problem until I went in my Youtube account upload section and saw the message create at least one channel before uploading videos. Hope it helps.

The error response you're getting is by design. Google does not allow Youtube API access via service accounts.

https://developers.google.com/youtube/v3/guides/moving_to_oauth#service-accounts-do-not-work-with-the-youtube-api

Service accounts do not work for YouTube Data API calls because service accounts require an associated YouTube channel, and you cannot associate new or existing channels with service accounts. If you use a service account to call the YouTube Data API, the API server returns an error with the error type set to unauthorized and the reason set to youtubeSignupRequired.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!