Set moderation status of YouTube comments
youtube.x.youtube-comments-setmoderationstatuscomments.setModerationStatus — Sets the moderation status of one or more comments.
- Prix
- freeAu prix catalogue
- Taux de réussite
- —Aucune donnée de taux de réussite pour le momentAucune donnée de taux de réussite pour le moment
- Latence p50
- ——
- Dernière vérification
- —Pas encore vérifié
POSThttps://toolswitch.dev/v1/tools/youtube.x.youtube-comments-setmoderationstatusBeta- Utilise le quota de la plateforme
- Réponse synchrone
- Lit des données publiques
Paramètres
| Paramètre | Type | Obligatoire | Description | Exemple |
|---|---|---|---|---|
| Paramètres de requête | ||||
id | chaîne | Obligatoire | Modifies the moderation status of the comments with the given IDs | |
banAuthor | booléen | Facultatif | 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 | chaîne | Obligatoire | 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'. | |
- Paramètres de requête
idchaîneObligatoireModifies the moderation status of the comments with the given IDs
banAuthorbooléenFacultatifIf 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.
moderationStatuschaîneObligatoireSpecifies 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'.
Exemples de code
Remplacez $TOOLSWITCH_KEY par la clé créée dans la 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());Cette API de passerelle est en version Beta ; son URL et son authentification peuvent changer. Les paramètres de l’exemple sont des données fictives. Les appels sont facturés à free, frais de service inclus.