Overview
Publishes a Moment with text, images, or video.
Request
Authentication Add authentication headers to the request. See Authentication
Method
POST
Rate limit
100 requests/second
Endpoint https://API domain/apigateway/moments/add
Content-Type
application/json
Request Parameters
| Parameter | Data Type | Required | Description | |
|---|---|---|---|---|
| user_id | string | Yes | Publisher user ID. Maximum length: 32 characters | |
| title | string | No | Moment title. Maximum length: 200 characters | |
| content | object | Yes | Moment content. | |
| content_brief | string | No | Moment content summary. Maximum length: 500 characters. |
Request Example
POST /apigateway/moments/add HTTP/1.1
appkey: appkey
Authorization: xxxxxxxxxxxxxxxxxx
Content-Type: application/json
{
"user_id":"userid1", // act as this user
"content":{
"text":"Moments post text",
"medias":[
{
"type":"image",
"url":"xxx",
"snapshot_url":"xxxx",
"height":100,
"width":100
},{
"type":"video",
"url":"xxxx",
"snapshot_url":"xxxx",
"duration":10,
"height":100,
"width":100
}
]
}
}
Response Example
{
"code":0,
"msg":"sucess",
"data":{
"moment_id":"xxx",
"moment_time":17212345678,
"user_info":{
"user_id":"xxx",
"nickname":"xxxxx",
"avatar":"xxxx"
}
}
}
Response codes
| Response codes | Description |
|---|