0

I am trying to use chatter REST API to GET and POST data into custom C# application from a Salesforce. I am able to get data successfully. But, when I try to POST data into Salesforce as a particular user(Users who do not have ConnectedAPI) it won't POST into the Salesforce chatter.

Please let me know how I could POST into Salesforce chatter as a different user(Users who do not have ConnectedAPI) from ConnectedAPI user. I use the ConnectedAPI user account for the POST.

In below JSON request Is there a way to add sender ID in request body? So, the chat in salesforce shows the right person.

REST URL : https://salesforce.com/services/data/v42.0/chatter/feed-elements

Request Body:

    { 
   "body" : {
      "messageSegments" : [
         {
            "type" : "Text",
            "text" : "Test message"
         }]
       },
   "feedElementType" : "FeedItem",
   "subjectId" : "Receiver ID here"
}
2
  • Are you trying to connect as a different user with access, but yet have the post show up created by a different user? Commented Jan 22, 2020 at 17:42
  • I am trying to connect as a different user without access. I have one account with the connected app. How can I POST a message as another user from a REST API? Commented Jan 23, 2020 at 8:39

0

You must log in to answer this question.