YouTube Data API v3 video upload 403 forbidden: YouTubeSignUpRequired

后端 未结 3 1971
臣服心动
臣服心动 2020-12-07 05:06

I am trying to use the new YouTube Data API v3 to upload video to youtube on Android, but I am getting a 403 forbidden error:

com.google.api.client.googleap         


        
相关标签:
3条回答
  • 2020-12-07 05:43

    You can use this mobile workflow in a WebView to have the user create the channel without leaving your app:

    https://m.youtube.com/create_channel?chromeless=1&next=/channel_creation_done

    To process will take the user to /channel_creation_done once completed, and you can close the WebView then. You can find more information about the workflow here: https://developers.google.com/youtube/create-channel

    0 讨论(0)
  • 2020-12-07 05:45

    It sounds like you're trying to upload a video into an unlinked Google account. That scenario is covered in this blog post to some extent, though the focus of that post is v2.1 of the API.

    When it comes to v3, you still can't upload a video into an unlinked Google account, and there's no API call to allow a user to programmatically link an account. Your best bet would be to take the user to http://m.youtube.com/create_channel and they can take care of the linking there from a browser, at which point they'd have to return to your app and attempt the upload again.

    0 讨论(0)
  • 2020-12-07 05:59

    I solved it and my answer is here: How to insert video youtube api v3 through service account with ruby Enjoy!

    The error you are getting is because you didn't add the person tag with the email to upload the movie to. It is all solved and working if you use the code in my answer

    0 讨论(0)
提交回复
热议问题