By design, native WhatsApp is encrypted end-to-end making separate analysis of those conversations impossible. To use WhatsApp or text messaging, you will need to feed the communication channels through another system, which could then expose the conversations via API. For WhatsApp, the WhatsApp for Business service allows this, but is currently in only limited release (or so I’ve been told…) There are third-party companies that can assist with getting this set up (Twilio, for example, can assist with WhatsApp, text, and other channels.)
For the record, I am the IT architect for a project in my company looking at these kids of services… not specifically for sentiment analysis (yet), but rather customer helpdesk interactions that allow us appropriate levels of visibility into the discussion regardless of the customer’s preferred channel. But I definitely see sentiment analysis as a roadmap for my company’s initiative within the next year or two.