Wrll it totally depends on your requirement. Both have their own pros and cons.
External API or SDK
Pros:
Just need integration, no need to handle complex logic.
You don't need any backend resources where messages and user data be stored (most of the time)
Cons:
You are limited to features provided by external API or SDK.
You need to pay hefty amount, and agree to their policies.
Your own implementation
Pros:
You have full control.
No need to pay hefty amounts.
Cons:
You need to handle everything, from user to chats and backend.
You still need to pay some amount for resources.
Security issues may rise, as already built solutions are industry tested.
You can decide based on above what suits you better.