Set moderation status of YouTube comments
youtube.x.youtube-comments-setmoderationstatuscomments.setModerationStatus — Sets the moderation status of one or more comments.
- Price
- freePelo preço do provedor
- Success rate
- —Ainda não há dados da taxa de sucessoAinda não há dados da taxa de sucesso
- Latency p50
- ——
- Last verified
- —Not verified yet
POSThttps://toolswitch.dev/v1/tools/youtube.x.youtube-comments-setmoderationstatusPreview- Uses platform quota
- Synchronous response
- Reads public data
Parâmetros
| Parâmetro | Tipo | Obrigatório | Descrição | Exemplo |
|---|---|---|---|---|
| Parâmetros de consulta | ||||
id | string | Obrigatório | Modifies the moderation status of the comments with the given IDs | |
banAuthor | booleano | Opcional | If set to true the author of the comment gets added to the ban list. This means all future comments of the author will autmomatically be rejected. Only valid in combination with STATUS_REJECTED. | |
moderationStatus | string | Obrigatório | Specifies the requested moderation status. Note, comments can be in statuses, which are not available through this call. For example, this call does not allow to mark a comment as 'likely spam'. Valid values: 'heldForReview', 'published' or 'rejected'. | |
- Parâmetros de consulta
idstringObrigatórioModifies the moderation status of the comments with the given IDs
banAuthorbooleanoOpcionalIf set to true the author of the comment gets added to the ban list. This means all future comments of the author will autmomatically be rejected. Only valid in combination with STATUS_REJECTED.
moderationStatusstringObrigatórioSpecifies the requested moderation status. Note, comments can be in statuses, which are not available through this call. For example, this call does not allow to mark a comment as 'likely spam'. Valid values: 'heldForReview', 'published' or 'rejected'.
Exemplos de código
Substitua $TOOLSWITCH_KEY pela chave criada no console.
curl -X POST 'https://toolswitch.dev/v1/tools/youtube.x.youtube-comments-setmoderationstatus' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY"import os
import requests
response = requests.request(
"POST",
"https://toolswitch.dev/v1/tools/youtube.x.youtube-comments-setmoderationstatus",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/youtube.x.youtube-comments-setmoderationstatus", {
method: "POST",
headers: {
"X-Toolswitch-Key": process.env.TOOLSWITCH_KEY ?? "",
},
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
console.log(await response.text());Esta API de gateway está em prévia; a URL e a autenticação podem mudar. Os parâmetros do exemplo são dados de amostra. As chamadas são cobradas a free, incluindo a taxa de serviço.