function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Raja Bipin Chandra  M BRaja Bipin Chandra M B 

Invoking Chatter Services from Salesforce Apex code.

Hello Gurus,

I am trying to utilise the REST API Chatter services within my salesforce Oragnisation. I am new to Salesforce and i am not sure how to access the function defined and send parameters to those Chatter services using REST request.  I blindly tried couple of steps using RESTful HTTP request from Salesforce but i am getting an error. Need your assistance on how to start and tackle this.

Thanks for your help! 

Regards,
Raja
Best Answer chosen by Raja Bipin Chandra M B
alouie_sfdcalouie_sfdc
Instead of making a REST callout, it would be easier to call one of the sendMessages() methods from the ConnectApi.ChatterMessages (https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_ConnectAPI_ChatterMessages_static_methods.htm) Apex class.

All Answers

Raja Bipin Chandra  M BRaja Bipin Chandra M B
Actually, i am trying to send private message to the opportunity owner and his manager on click of a button from a visual force page. IS this possible?
Mudasir WaniMudasir Wani
Hi Raja,

You can follow the below link.
https://developer.salesforce.com/page/Chatter_API

I recommand you to first go through the below section.
Webinars and Videos 

Please mark this as solution if this solves your problem, So that if anyone has this issue this can help.
 
alouie_sfdcalouie_sfdc
Instead of making a REST callout, it would be easier to call one of the sendMessages() methods from the ConnectApi.ChatterMessages (https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_ConnectAPI_ChatterMessages_static_methods.htm) Apex class.
This was selected as the best answer
Raja Bipin Chandra  M BRaja Bipin Chandra M B
Dear Alouie_sfdc/Mudasir,

Thanks  sooo much!  It did help.

Regards,
raja