0

I'm trying to understand the difference between Chatter REST Api and ConnectAPI in terms of capabilities.
If my task is to post to a Chatter feed from an external application, I believe there would be two approaches:
- Post to Chatter REST Api
- Expose a Rest Resource in Apex and use the ConnectAPI provided classes and methods in the get, post handlers of the resource
Please help me in understanding the difference in these approaches and suggest the right one.

1

The Connect API is meant to be used in situations where you want to do posts in Apex: Visualforce, Apex code triggers, and Lightning. You would not ordinarily write a custom REST API service when there is a viable, non-custom way to perform the same action. Stated more simply, use the Connect API when you're already using Apex and need to post a Chatter message of some sort, and use the Chatter API for external applications and Visualforce pages that are driven by JavaScript.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.