AI Chatbot Hub
HomepageAPI docsDiscordLog inSign up
Documentation
Documentation
  • welcome
    • Quick start guide
    • Creating your first AI chatbot
  • Dashboard
    • Analytics
  • Account
    • Account settings
    • Get OpenAI API key
    • API docs
  • Inbox
    • Navigating the Inbox menu
  • Sources
    • Navigating the Sources menu
    • Best practices for preparing data
    • Adding training data
    • How to work with tables
  • AI agents
    • Creating AI agents
    • Fine-tune intents
    • Supervisor overrides
    • Function calling
    • Bias and stickiness
  • Customizations
    • Settings
      • Security
      • Conversations
      • Custom domains
      • Disclaimer
      • Human support escalation
    • User Data Management
      • File uploader
      • Conversation labeling
      • User data collection
      • Forms
      • Webhooks
      • User identity verification
    • Appearance & Style
      • General
      • Messages
      • Suggested prompts
      • Watermark
      • Button
  • Collaborators
    • Permissions
    • Transfer ownership
  • Preview
    • Overview
  • Go live
    • Integrations
  • Community
    • Partners
    • Affiliates
    • Discord
  • Resources
    • Get a free template
    • Enterprise
    • Glossary
    • Support
Powered by GitBook
On this page
  • Step 1: Enable User Identity
  • Step 2: Setting up the API endpoint
  • Step 3: Store user data
  • Step 4: Integrate token in AI Chatbot Hub
  1. Customizations
  2. User Data Management

User identity verification

Follow this guide to implement a robust authentication system within your chatbot projects.

PreviousWebhooksNextAppearance & Style

Last updated 6 months ago

Step 1: Enable User Identity

In the chatbot settings, enable “User Identity Verification” to allow automatic user token checks during interactions.

Step 2: Setting up the API endpoint

To verify user tokens, set up an API endpoint that accepts POST requests.

  1. Specify the Endpoint: Add the endpoint’s URL in your chatbot settings. This is where verification requests will be directed.

  2. Configure for POST Requests: Ensure the endpoint is prepared to handle POST requests, as AI Chatbot Hub will send token data through these requests for secure verification.

Verification Flow

  1. Token submission: AI Chatbot Hub sends a verification request with the user’s token to your endpoint.

  2. Processing: Validate the token to allow or deny user access.

  3. Outcome Handling:

    • Successful Verification: When the token is verified, the chatbot grants access, allowing the authenticated user to continue the chat.

    • Failed Verification: If the API returns an error, the verification is unsuccessful, and the user is directed to an error screen.

Step 3: Store user data

To improve the User Identity Verification process and keep records of user interactions, you can store the data from each successful verification by enabling "Save data on success".

Each time a user is authenticated, the response details (usually user identification info) are saved and linked to their specific chat sessions.

Valid JSON Only: Ensure all data for storage is in valid JSON format. Any non-JSON or improperly formatted data will be disregarded and won’t be saved in the chat history.

Example JSON:

{
  "userId": "12345",
  "userName": "JohnDoe",
  "email": "johndoe@example.com",
  "verified": true,
  "roles": ["user", "admin"],
  "profile": {
    "firstName": "John",
    "lastName": "Doe",
    "age": 30
  }
}

Step 4: Integrate token in AI Chatbot Hub

Chat Widget

Add the token to GPTTConfig in your site’s chatbot script:

<script>
  window.GPTTConfig = {
      uuid: "15b1f07cd512346c94c210779a6c3c19",
      token: <"Custom token">
  }
</script>
<script src="https://app.aichatbothub.com/widget-asset.min.js" defer></script>

You can also directly set the GPTTConfig object with your token using a JavaScript call, which is ideal if you need to update the token dynamically based on user interactions or other triggers within your application. Here's how:

window.GPTTConfig.token = "Custom token";

Once the token property is updated, the system will initiate authentication with the new token to verify the user’s identity every time they interact with the chatbot.

Iframe

Include the token directly in the iframe src URL:

<iframe
  src="https://app.aichatbothub.com/widget/162223v?token=<custom_token>"
  width="100%"
  height="500px"
  frameborder="0"
></iframe>

By following these steps, you can set up secure user identity verification with AI Chatbot Hub for a reliable user experience.

user identity verification
enable user identity