AI Integration Quick Reference
AI Integration Quick Reference
Methods
All methods are accessed via theCometChatUIKit class.
Init
Initializes the CometChat React Native SDK. Must be called on app startup before any other UI Kit method.Replace
APP_ID, REGION, and AUTH_KEY with values from the CometChat Dashboard. Auth Key is optional — use Auth Token for production.- JavaScript
Login using Auth Key
Simple authentication for development/POC. For production, use Auth Token.- JavaScript
Login using Auth Token
Production-safe authentication that does not expose the Auth Key in client code.- Create a User via the CometChat API when the user signs up in your app.
- Create an Auth Token via the CometChat API for the new user and save the token in your database.
- Load the Auth Token in your client and pass it to the
login()method.
- JavaScript
Logout
Ends the current user session.- JavaScript
Create User
Takes aUser object and returns the created User object.
- JavaScript
Update User
Takes aUser object and returns the updated User object.
- JavaScript
Sending Messages
Text Message
Sends a text message in a 1:1 or group chat.- JavaScript
Media Message
Sends a media message in a 1:1 or group chat.- JavaScript
Custom Message
Sends a custom message (neither text nor media) in a 1:1 or group chat.- JavaScript
Interactive Messages
Form Message
Sends a Form message which is an extension of Interactive Message.- 1:1 Chat
- Group Chat
Card Message
Sends a Card message which is an extension of Interactive Message.- 1:1 Chat
- Group Chat
Custom Interactive Message
Sends a CustomInteractive message which is an extension of Interactive Message.- 1:1 Chat
- Group Chat
UIKitSettings
UIKitSettings is an object containing credentials to initialize CometChat SDK.
Next Steps
Integration
Complete guide to integrating the UI Kit
Events
Listen to UI Kit events for custom behavior
Components Overview
Explore all available UI components
Theme
Customize the look and feel of the UI Kit