I've got code based on Google's YouTube Data API (v3.0) videos.insert example, which fails consistently for a particular user and authorization token with a Failed to start the resumable upload
exception.
The code works well for other user/auth tokens.
I can use the auth token to list the users YouTube channel resources (showing that the token is valid), and compare with other users channels. The only difference that shows up is that the channel resources for the particular user doesn't show a googlePlusUserId
.
Any thoughts as to what I'm missing, or what to check next?
Turns out it's possible for a user to give YouTube account permissions without actually having a YouTube account ;-)
In
Google_MediaFileUpload::getResumeUri
, if a valid response isn't received, aFailed to start the resumable upload
exception is thrown, and the response (containing the error reason) is thrown away.In this case, dumping the response showed the reason:
youtubeSignupRequired
.(For my local code, I'm saving the response so the caller can report why the upload failed)
Update -- from YouTube Data API - Errors