Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3637

How can I upload video to a specific YouTube channel using Apps Script?

$
0
0

I am trying to post a video to one of my brand Youtube accounts.But when I use apps script, I cannot choose to what channel video should be uploaded.

May be there is any way to specify channel, or use brand accounts to upload videos?

Here is my code:

function PostVideoToYT(channel_id, video_url, title, description) {  const sourceFile = UrlFetchApp.fetch(video_url, { muteHttpExceptions: true }).getBlob();  const videoResource = {    snippet: {      title: title,      description: description,      channelId:"UCNywJdNO5K6edWupWD6opVw",    },    status: { privacyStatus: 'private' },  };  const newVideo = YouTube.Videos.insert(videoResource, "snippet,status", sourceFile);  // Modified  Logger.log(newVideo)  return newVideo;}

How can I specify channel id?


Viewing all articles
Browse latest Browse all 3637

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>