I am using C# (.net 7) and google api package to upload but cannot upload it to a specific channel. It seems it ignores video.Snippet.ChannelId
video.Snippet.ChannelId = "UCXXXXXXXXXX";whenever I try to upload this way it upload to personal account (default youtube channel)
I also tried to use OnBehalfOfContentOwnerChannel and OnBehalfOfContentOwner
var videosInsertRequest = youtubeService.Videos.Insert(video, "snippet,status", fileStream, "video/*"); videosInsertRequest.OnBehalfOfContentOwnerChannel = "UCXXXXXXXXXX"; videosInsertRequest.OnBehalfOfContentOwner = "{ChannelHandler*}";I am getting the below error;
An error prevented the upload from completing.The service youtube has thrown an exception.HttpStatusCode is Forbidden.Google.Apis.Requests.RequestErrorThe authenticated user cannot act on behalf of the specified Google account. [403]Errors [ Message[The authenticated user cannot act on behalf of the specified Google account.] Location[ - ] Reason[accountDelegationForbidden] Domain[youtube.common]]Google.GoogleApiException: The service youtube has thrown an exception. HttpStatusCode is Forbidden. The authenticated user cannot act on behalf of the specified Google account. at Google.Apis.Upload.ResumableUpload`1.InitiateSessionAsync(CancellationToken cancellationToken) at Google.Apis.Upload.ResumableUpload.UploadAsync(CancellationToken cancellationToken)I am pretty sure I am missing something but not sure what. I have similar issues to download my own caption but I am assuming this will also fix that issue as well.
*Channel handler is what you see in the channel page with @ eg for https://www.youtube.com/@VOLEapp I assume it is VOLEapp
Thanks,