如何使用 WP Rest API v2 创建评论?

How to Create a comment using WP Rest API v2?

我正在尝试通过 WP Rest APi v2 使用对以下 url:

POST 请求创建新评论
https://www.turboweb.online/wp-json/wp/v2/comments?author_email=admin@admin.com&author_name=alex bhati&content=nice post&post=4002

但是,这是我每次收到的回复:

{
    "code": "rest_forbidden_param",
    "message": "Query parameter not permitted: author_email",
    "data": {
        "status": 401
    }
}

author_email 字段需要授权才能添加,也许这个答案可以帮助:WP Rest API not allowing to post anonymous comments through a Laravel request