Verba LogoDocs

Authentication

Verba AI supports two modes of authentication: unauthenticated (public) and authenticated (private) sessions. To use authenticated sessions, you need to contact us to get your secret, and then you can use the token option in the VerbaChat class to authenticate users.

Unauthenticated sessions

Unauthenticated sessions are the default mode of operation. In this mode, the chat widget is publicly accessible and can be used by any user without authentication.

Authenticated sessions

Authenticated sessions are used to identify and authenticate users. In this mode, the chat widget is only accessible to authenticated users.

Token-based authentication

Verba AI supports token-based authentication. In this mode, the chat widget is authenticated using a token that is passed as an option to the VerbaChat class.

javascript
import { VerbaChat } from '@verba-ai/chat-sdk'

const chat = new VerbaChat({
    tagId: 'YOUR_TAG_ID',
    token: 'jwt-auth-token-str',
})

chat.init()