I am creating a script to upload videos to youtube using Google's YouTube data API version 3.
for uploading I followed the example given at https://developers.google.com/youtube/v3/guides/uploading_a_video
now I want to add uploaded video to playlist in my youtube channel. I did not find any example code for doing this in Python for YouTube Data API version 3.
This question is giving me answer but its for older version(version 1) of Youtube Data API
I guess developers.google.com/youtube/v3/docs/playlistItems/insert can help me, but I am not sure of arguments to be passed into insert() in youtube.playlistItem().insert()
I am looking for some help or example code to add video in playlist using Python for API v3.
You are using the right method, for parameters:
part: snippet (or whatever part of the playlistItem resource you want in return)
snippet.playlistId: id of the playlist to add. you can find it through playlists.list() method if you don't know it, with setting "mine=true"
snippet.resourceId: video id of the video. you can find it through videos.list() method if you don't know it, with setting "mine=true"
please check below URL for v3 https://developers.google.com/youtube/v3/docs/playlists
code is: