I'm trying to set the publishAt date of a youtube video to 5 minutes from now:
Request
GET https://www.googleapis.com/youtube/v3/videos?part=status&id=_VIDEOID_&key=_KEY_
Authorization: Bearer xxxxx
X-JavaScript-User-Agent: Google APIs Explorer
Response
200 OK
{
- snip-
"items": [
{
"kind": "youtube#video",
"etag": "\"F9iA7pnxqNgrkOutjQAa9F2k8HY/ctlUM3pGyXYfW6_IYy2nlhviZZ4\"",
"id": "_VIDEOID_",
"status": {
"uploadStatus": "processed",
"privacyStatus": "private",
"license": "youtube",
"embeddable": true,
"publicStatsViewable": true
}
}
]
}
So fine, I get the video info, then I try to set the video's publishAt value
Request
PUT https://www.googleapis.com/youtube/v3/videos?part=status&key=_KEY_
Content-Type: application/json
Authorization: Bearer xxxx
X-JavaScript-User-Agent: Google APIs Explorer
{
"status": {
"embeddable": true,
"license": "youtube",
"privacyStatus": "private",
"publicStatsViewable": true,
"publishAt": "2015-01-21T11:20:27.751+00:00"
},
"id": "_VIDEOID_"
}
Response
400 Bad Request
{
"error": {
"errors": [
{
"domain": "youtube.video",
"reason": "invalidRequest",
"message": "Bad Request"
}
],
"code": 400,
"message": "Bad Request"
}
}
Any clues?
I can't see what I'm doing wrong. The documentation says that i should be able to set the publishAt value. I can't work this one out!
I've tested this using https://developers.google.com/youtube/v3/docs/videos/update and the C# API with the same response.