Quantcast
Viewing all articles
Browse latest Browse all 5

POST as another user using Salesfore API. (Sender Id unavailable in request body)

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"
}

Viewing all articles
Browse latest Browse all 5

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>