If your CometChat HTML code does not contain chat_auth
variable, it is possible that the Basic Security features of CometChat are not enabled.
Before you begin, Sign in to your CometChat Client Area and click on the Manage button and then note down the Auth Key
present in API Keys (top right button).
Then perform these steps to enable Basic Security
Add chat_auth
variable to your HTML code
Just after the line which contains chat_appid
, add the chat_auth
code:
<script>
var chat_appid = 'APP_ID';
// Add the following line
var chat_auth = 'AUTH_KEY';
// Leave the remaining code below as it is
</script>
Replace AUTH_KEY
in the above code with your actual Auth Key.