You need to sign in to do that
Don't have an account?
Matrixinline
Posting to group using chatter rest API fails..
Hi All.
I am trying to post a chatter feed using
METHOD: POST
URL: https://ap1.salesforce.com/services/data/v29.0/chatter/feeds/record/XXXXXXX/feed-items
HEADER: Authorization OAuth XXXXXXXXXXXXXXXXX
POST DATA:
{ "body" :
{
"messageSegments" : [
{
"type": "Text",
"text" : "Check out the latest building proposal"
}
]
}
}
but it returned
[{"message":"No attachment found and body is empty. Provide a non-empty 'text' parameter, or a rich input including non-empty message segments. If providing rich JSON/XML input in REST, make sure to include Content-Type header. In multipart REST, include the Content-Type in the part.","errorCode":"MISSING_ARGUMENT"}]
but when I changed the URL to
https://ap1.salesforce.com/services/data/v29.0/chatter/feeds/record/XXXXXXX/feed-items?text=SomeTest
then it gets posted but text posted is queryparameter not from post data.
I am trying to post a chatter feed using
METHOD: POST
URL: https://ap1.salesforce.com/services/data/v29.0/chatter/feeds/record/XXXXXXX/feed-items
HEADER: Authorization OAuth XXXXXXXXXXXXXXXXX
POST DATA:
{ "body" :
{
"messageSegments" : [
{
"type": "Text",
"text" : "Check out the latest building proposal"
}
]
}
}
but it returned
[{"message":"No attachment found and body is empty. Provide a non-empty 'text' parameter, or a rich input including non-empty message segments. If providing rich JSON/XML input in REST, make sure to include Content-Type header. In multipart REST, include the Content-Type in the part.","errorCode":"MISSING_ARGUMENT"}]
but when I changed the URL to
https://ap1.salesforce.com/services/data/v29.0/chatter/feeds/record/XXXXXXX/feed-items?text=SomeTest
then it gets posted but text posted is queryparameter not from post data.
Matrixinline
Ok figured it out need to set content-type as "application/json"..