set_comment_moderation_status: Set Comment Moderation Status

View source: R/comments_write.R

set_comment_moderation_statusR Documentation

Set Comment Moderation Status

Description

Sets the moderation status of one or more comments. Requires OAuth 2.0 authentication and owner privileges.

Usage

set_comment_moderation_status(
  comment_id,
  moderation_status,
  ban_author = FALSE,
  ...
)

Arguments

comment_id

Character vector. The IDs of the comments to update.

moderation_status

Character. Valid values are 'heldForReview', 'published', 'rejected'.

ban_author

Logical. Whether to ban the author from commenting on the channel. Optional.

...

Additional arguments passed to tuber_POST_json.

Value

A list containing the API response.

References

https://developers.google.com/youtube/v3/docs/comments/setModerationStatus

Examples

## Not run: 
# Set API token via yt_oauth() first

set_comment_moderation_status(comment_id = "Ugz...", moderation_status = "rejected")

## End(Not run)

tuber documentation built on March 25, 2026, 9:08 a.m.