Set moderation status of YouTube comments
youtube.x.youtube-comments-setmoderationstatuscomments.setModerationStatus — Sets the moderation status of one or more comments.
- Price
- freeAl precio del proveedor
- Success rate
- —Aún no hay datos de tasa de éxitoAún no hay datos de tasa de éxito
- 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 | Obligatorio | Descripción | Ejemplo |
|---|---|---|---|---|
| Parámetros de consulta | ||||
id | cadena | Obligatorio | 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 | cadena | Obligatorio | 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
idcadenaObligatorioModifies 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.
moderationStatuscadenaObligatorioSpecifies 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'.
Ejemplos de código
Sustituye $TOOLSWITCH_KEY por la clave que creaste en la consola.
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());La API de la pasarela está en versión preliminar; su URL y autenticación pueden cambiar. Los parámetros del ejemplo son datos de muestra. Las llamadas se facturan a free, incluida la tarifa de servicio.