-
Notifications
You must be signed in to change notification settings - Fork 23
Authentication Types
Luiz Guilherme edited this page Oct 1, 2020
·
2 revisions
BLiP Chat Widget supports two different user authentication types. It's possible to define which authentication method BLiP Chat will use to identify your clients.
- GUEST (default) - Users will receive a guest account to interact with the chatbot. A guest account expire after 30 days. In this mode the users have not message history.
- DEV_AUTH - Users will receive an account identified by the developer to interact with the chatbot. Any user is identified by two parameters
userIdentity
anduserPassword
. In order to update any other information about the user use thewithAccount
method (you can use any property defined here ). In this mode the users have message history.
To define DEV_AUTH user authentication type use the withAuth
method on builder object.
Note: 'GUEST' type will be used as default If you do not use the 'withAuth' method.
import { BlipChat } from "blip-chat-widget";
new BlipChat()
.withAppKey("YOUR-APP-KEY")
.withButton({ color: "#2CC3D5" })
.build();
var builder = new BlipChat()
.withAppKey("YOUR-APP-KEY")
.withButton({ color: "#2CC3D5" })
.withAuth({
authType: BlipChat.DEV_AUTH,
userIdentity: '1234567',
userPassword: 'MTIzNDU2',
})
.withAccount({
fullName: 'John Doe',
email:'[email protected]',
phoneNumber: '+15055034455',
city: 'Decatur',
});
builder.build()