Overview
Posts a comment on a Moment.
Request
Authentication Add authentication headers to the request. See Authentication
Method
POST
Rate limit
100 requests/second
Endpoint https://API domain/apigateway/moments/comments/add
Content-Type
application/json
Request Parameters
| Parameter | Data Type | Required | Description | |
|---|---|---|---|---|
| user_id | string | Yes | Comment author user ID. Maximum length: 32 characters | |
| moment_id | string | Yes | Moment ID. Maximum length: 32 characters | |
| parent_comment_id | string | No | Parent comment ID. Maximum length: 32 characters | |
| content | object | Yes | Comment content. |
Request Example
POST /apigateway/moments/comments/add HTTP/1.1
appkey: appkey
Authorization: xxxxxxxxxxxxxxxxxx
Content-Type: application/json
{
"user_id":"userid1", // publish as this user
"moment_id":"Moments post ID",
"parent_comment_id":"parent comment ID",
"content":{
"text":"comment content"
}
}
Response Example
{
"code":0,
"msg":"sucess",
"data":{
"comment_id":"xxx",
"comment_time":17212345678,
"user_info":{
"user_id":"xxx",
"nickname":"xxxxx",
"avatar":"xxxx"
}
}
}
Response codes
| Response codes | Description |
|---|