php - YouTube API - how to specify which channel to upload to -
we have script uploads videos youtube have been uploaded our server previously. it's rather large script i'll try , quite concise. code attempting upload...
$video = ... // our model instance, queue videos in db table $media = new google_http_mediafileupload(... . . . $fp = fopen($videofile, 'rb'); while (!$status && !feof($fp)) { $chunk = fread($fp, $chunksize); $status = $media->nextchunk($chunk); $video->progress = $media->getprogress(); $video->save(); } fclose($fp); $fp = null; $client->setdefer(false); ...is getting following error youtube api:
0: failed start resumable upload (http 401: youtube.header, unauthorized) from can see, our script working should. gets access token, until point it's attempting upload file seems fine. gets following error youtube , handles error designed.
according post, reason error channel doesn't exist account issues oauth/api credentials.
youtube api3.0 videos.insert (upload) -- "failed start resumable upload" exception
.. although account owns credentials isn't owner of target channel, manager of channel. bit of perplex setup know has been setup number of years , credentials haven't changed, our software newer version. account issues oauth credentials manager of target channel, case of specifying channel upload to? e.g. channels account owns/manages. can't see specifies in previous version either, i'm wondering if it's should there anyway.
uploading video on behalf of content owner not allowed standard google account reason why getting unauthorized response. in order should first transfer of ownership of account should done owner himself. (as stated in support page)
quoted below steps on how can this.
each google+ page has 1 owner; owner applies connected youtube channel. transfer ownership of channel connected google+ page, need transfer ownership of page itself. person transfer ownership must manager of page @ least 1 day.
only current owner can transfer ownership. sign in page owner google account.
on youtube, make sure pick right channel. go channel's account settings , click add or remove managers.
click dropdown arrow below person's name , select transfer ownership.
Comments
Post a Comment