Create Conversation Session
Create conversation session
Description
Conversation tokens allow client-side applications to create a unique, authenticated credential for each conversation. This token can be used to interact with the conversation/{conversationId}/send, conversation/{conversationId}/receive, and conversation/{conversationId}/message/create routes on api.chatbotkit.com. By creating an individual token for each conversation, a client-side application is able to directly access and manipulate the conversation through these routes. Without conversation tokens, a client-side application would need to authenticate and access ChatBotKit conversation routes through a server-side application, which can be more complex and require additional infrastructure. By providing a way for client-side applications to authenticate and access the conversation routes directly, the token route simplifies the process of integrating with api.chatbotkit.com and makes it more convenient for developers to build chatbot applications.
Authorization
ChatBotKit API Secret * Required
HTTP Authorization Scheme: bearer
Path Parameters
conversationIdstring* Required
The ID of the conversation
Request Body * Required
Request Body Schema: application/json
durationInSecondsnumber
The maximum amount of time this session will stay open
curl -X POST "https://api.chatbotkit.com/v1/conversation/{conversationId}/session/create" \-H "Authorization: Bearer $CHATBOTKIT_API_SECRET" \
-H "Content-Type: application/json" \
--data-binary @- << EOF {} EOF"durationInSeconds":"number"
{"id":"string","token":"string","expiresAt":"number"}