User identity verification
Follow this guide to implement a robust authentication system within your chatbot projects.
Last updated
Follow this guide to implement a robust authentication system within your chatbot projects.
Last updated
In the chatbot settings, enable “User Identity Verification” to allow automatic user token checks during interactions.
To verify user tokens, set up an API endpoint that accepts POST requests.
Specify the Endpoint: Add the endpoint’s URL in your chatbot settings. This is where verification requests will be directed.
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.
Token submission: AI Chatbot Hub sends a verification request with the user’s token to your endpoint.
Processing: Validate the token to allow or deny user access.
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.
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.
Add the token to GPTTConfig
in your site’s chatbot 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:
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.
Include the token directly in the iframe src
URL:
By following these steps, you can set up secure user identity verification with AI Chatbot Hub for a reliable user experience.