In the Web Chat channel, MindBehind supports three types of authentication: anonymous, through a one-time code delivered to the client's mobile phone as an SMS message, or tokens if the client already signed in to your website. It is important to directly authenticate them when they use MindBehind's Web Chat installed on your website.
To generate a channel management token, follow the steps below:
Navigate to your company profile page.
Go to the Channels tab and generate a token for the target Web Chat channel.

Copy the channel ID and management token. Keep them in a safe place.
Call our endpoint to generate a token for your client with the following information:
Endpoint URL | https://app.mindbehind.com/external/v1/incoming/mbWebChat/token |
HTTP Method | POST |
Required Header | “apiToken” as the channel management token |
Body | It should be in JSON format with the following schema:
|
Result | You will get a JSON payload as follows: { success: true, token: <The generate token as string> } |
After you get the token, you will need to inject the token and your client ID into the window object in JavaScript before putting the MindBehind web chat script as below:
window.MB_TOKEN = "<The generated token>";
window.MB_CLIENT = "<Your client id>";
After the end users open the web chat widget, they will be automatically authenticated with our system until the token expires.