chatWith( )

chatWith API assists you to dynamically launch a chat box directly from your web page.The chatWith API is used to launch a chat box. The input parameter is the user’s ID with whom the conversation has to be initiated.

API:

jqcc.cometchat.chatWith('USERID',1);

Sample:

The ideal use of this function is in profile pages i.e. to add a “Chat with me” link to profiles.

<a href="javascript:void(0)" onclick="javascript:jqcc.cometchat.chatWith('123',1);">Chat with me<a>

Not finding what you need?

The CometChat team is here to help!