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/momentgateway/moments/add
Content-Type:
application/json
Request parameters
Request example
POST /momentgateway/moments/add HTTP/1.1
appkey: appkey
Authorization: xxxxxxxxxxxxxxxxxx
Content-Type: application/json
{
"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 |
|---|