Using Google's google-api-nodejs-client (official google node library), I had this piece of code running many months ago. I had left it aside.
googleapis.discover('youtube', 'v3').execute(function (err, client) {
var request = client.youtube.playlists.insert({
part: 'snippet,status',
resource: {
snippet: {
title: "hello",
description: "description"
},
status: {
privacyStatus: "private"
}
}
});
request.withAuthClient(oauth2Client).execute(function (err, res) {...
I have restarted the project and downloaded the latest version of the library through npm and now when I run the code above I systematically get the following error object:
Object
code: 400
errors: Array[1]
0: Object
domain: "youtube.playlist"
message: "Must specify playlist title."
reason: "playlistTitleRequired"
length: 1
length: 1
message: "Must specify playlist title."
Which according to the document and sample seems correct google sample code
I've stepped through the library code, it seems that the request is not being built properly but before reporting it as a possible bug I wanted to ask the hive mind.
Anyone had success using the library recently? Thanks.