enter code hereI want to update a broadcast. I tried with the explorer on youtube's live site and it works.
I tried with my script and i've an error : "Id is required". I tried with cURL too and i've the same error.
This error :
"error": {
"code": 400,
"message": "Id is required",
"errors": [
{
"message": "Id is required",
"domain": "youtube.liveBroadcast",
"reason": "idRequired",
"extendedHelp": "https://developers.google.com/youtube/v3/live/docs/liveBroadcasts/update#request_body"
}
]
}
url='https://youtube.googleapis.com/youtube/v3/liveBroadcasts?part=snippet%2C%20status%2C%20contentDetails&key=[KEY]';
request({
url: url,
method: 'PUT',
headers: {
'Authorization': 'Bearer [TOKEN]',
'Accept': 'application/json',
'Content-Type': 'application/json'
},
data: '{"id":"[broadcastId]","contentDetails":{"enableClosedCaptions":true,"enableContentEncryption":true,"enableDvr":true,"enableEmbed":true,"recordFromStart":true,"startWithSlate":true,"monitorStream":{"enableMonitorStream":true,"broadcastStreamDelayMs":5}}}'
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…