I am using youtube api via nodejs and I can
- successfully upload a video via my code
The problem is that my call to set publishedAt
fails with
Insufficient permissions
I am using this scope
const authUrl = this.oauth2Client.generateAuthUrl({
access_type: 'offline',
scope: ['https://www.googleapis.com/auth/youtube.upload'],
});
What scope do I need for setting publishedAt date and updating one existing video ?
Code as below
await this.youtube.videos.update({
part: ['snippet'],
requestBody: {
id: videoId,
snippet: {
publishedAt: moment(scheduledTime).toISOString(),
},
status: {
privacyStatus: 'public',
},
},
});