api-samples
api-samples copied to clipboard
YouTube Upload Video ChannelID Parameter - Error
Hi,
I am using the Python library and here is the code to authorize.
flow = InstalledAppFlow.from_client_secrets_file(CLIENT_SECRETS_FILE, SCOPES)
credentials = flow.run_local_server(port=8081)
Uploading part is
youtube.videos().insert(
onBehalfOfContentOwner="#####myuserid#####",
onBehalfOfContentOwnerChannel="#####mychannelid#####",
Initially I had created first first channel (say Channel A, the primary user channel), after sometimes, I had created one more channel (Say Channel B, Brand channel) under the same user account.
I did not specify the Channel id. The upload is successful and all is well. The video uploaded to Channel A. The problem is, I have one more channnel in the same user account, thus I have to specify the channel id. I could not find how to send the channel id.
I am not "YouTube content partners". I pass the channId to the onBehalfOfContentOwner but it fails. Please advise how to upload my own secondary channel. Here is the error I am receiving now.
googleapiclient.errors.ResumableUploadError: <HttpError 403 when requesting None returned "The authenticated user cannot act on behalf of the specified Google account.". Details: "[{'message': 'The authenticated user cannot act on behalf of the specified Google account.', 'domain': 'youtube.common', 'reason': 'accountDelegationForbidden'}]">
you got any solution ? please replay if any i am facing similar problem
Hi,
Code can upload videos to the primary channel. One account can have only one primary and multiple secondary channels.