Forum Discussion
Hi VikasB,
I have created message with below given data, that also its throwing error,
Method : POST
URL : https://api.stage.lithium.com/community/2.0/hhhkhk/messages
Headers: Content-Type - application/json
client-id - asdasdasdasd
Authorization - Bearer dfdsfsdfsd
Data :
{
"data": {
"type": "message",
"subject": "hello world",
"body": "this is a message post.",
"board": {
"id": "abcdiscussions"
},
"labels":"test1, test2"
}
}
Repsonse:
{"status":"error","message":"Unable to parse the required Content-Body from the request.","data":{"type":"error_data","code":308,"developer_message":"'labels' object does not contain a 'list_item_type' property, which is required for lists.","more_info":""},"metadata":{}}
Note: One more thing, which call can we use for REST API (https://api.stage.lithium.com/community/2.0/hhhkhk/messages OR http://community.lithium.com/community-name/restapi/vc)
Regards
Rajesh
nrajesh You can use this one even with the GET call also
https://lithiumstage.xyz.com/restapi/vc/blogs/id/[id]/messages/post?message.subject=Test&message.body=Test&label.labels=Test1,Test2'
In your post call, I guess you are not sending the parameter in the required format as an error mentioned in your post. The parameters should be like message.subject, messgae.body, label.labels etc.
Hope it would work for you.
Related Content
- 2 years ago
- 4 years ago
- 2 years ago