Эта конечная точка не работает так, как предполагается в соответствии с документацией YouTube API.
Я могу установить moderationStatus как опубликовано
и затем установите moderationStatus как отклонено без проблем
но я не могу изменить его обратно с отклоненного на что-либо еще, оно всегда возвращает:
{
"error": {
"errors": [
{
"domain": "youtube.comment",
"reason": "processingFailure",
"message": "The API server failed to successfully process the request. While this can be a transient error, it usually indicates that the requests input is invalid.",
"locationType": "parameter",
"location": "id"
}
],
"code": 400,
"message": "The API server failed to successfully process the request. While this can be a transient error, it usually indicates that the requests input is invalid."
}
}
Я получаю ту же ошибку из официальной библиотеки Google Google, из консоли YouTube youtube и CURL.
ОБНОВЛЕНИЕ - Пример HTTP-запроса:
POST /youtube/v3/comments/setModerationStatus?id=UgyxQJSR-xEMmAWJDjZ4AaABAg&moderationStatus=published HTTP/1.1
Authorization: Bearer {MY_VALID_ACCESS_TOKEN}
Content-Length: 0
Host: www.googleapis.com
Content-Type: application/json
HTTP/1.1 400
status: 400
access-control-allow-credentials: true
access-control-allow-origin: chrome-extension://aejoelaoggembcahagimdiliamlcdmfm
vary: Origin
vary: X-Origin
content-type: application/json; charset=UTF-8
content-encoding: gzip
access-control-expose-headers: Content-Encoding,Content-Length,Content-Type,Date,Server,Vary,X-Google-GFE-Backend-Request-Cost
date: Thu, 31 May 2018 15:54:36 GMT
expires: Thu, 31 May 2018 15:54:36 GMT
cache-control: private, max-age=0
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
x-xss-protection: 1; mode=block
content-length: 245
server: GSE
alt-svc: quic=":443"; ma=2592000; v="43,42,41,39,35"