Next.js Authenticated Chat with Contacts
Demonstrates ChatBotKit Contacts for managing end-users in authenticated conversations with NextAuth.js integration and UUID-based fingerprinting.
This example showcases ChatBotKit Contacts, a powerful feature for managing end-users who interact with your AI agents. Contacts enable conversation tracking, personalized experiences, and authentication management that allows users to connect 3rd-party systems like Google or Microsoft.
The architecture uses NextAuth.js for session management and generates UUID v5 fingerprints to uniquely identify users. When a conversation starts, ChatBotKit automatically creates or retrieves the contact based on the fingerprint, ensuring all conversations are properly associated with users.
This pattern is essential for production applications that need user management, conversation history, personalization, and the ability to authenticate users with external services. Contacts unlock advanced features like allowing AI agents to access Google Calendar, Gmail, or other integrations on behalf of authenticated users.
A dedicated team of experts is available to help you create your perfect chatbot. Reach out via or chat for more information.