Skip to main content

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​

ParameterData TypeRequiredDescription
user_idstringYesComment author user ID. Maximum length: 32 characters
moment_idstringYesMoment ID. Maximum length: 32 characters
parent_comment_idstringNoParent comment ID. Maximum length: 32 characters
contentobjectYesComment 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 codesDescription