JavaScript API

The JavaScript API enables you to call CometChat functions directly from your site pages. You can use the JavaScript API to launch chat boxes, set alerts and more.

The most common use the JS API is to load a chat box directly from your webpage e.g. from a user’s profile -> Chat with me. Check the chatWith() function to achieve this functionality.

Not finding what you need?

The CometChat team is here to help!