OpenAI ChatKit icon

OpenAI ChatKit

Talk to Agent Builder workflows through the ChatKit beta.

Session → Refresh

AI-generated

Overview

This node interacts with the OpenAI ChatKit API to manage ChatKit sessions and send messages to Agent Builder workflows. Specifically, the 'Session - Refresh' operation refreshes an existing stored ChatKit session by obtaining a new client secret and updating the session data. This is useful for maintaining active sessions without needing to create new ones repeatedly, ensuring continued communication with the workflow.

Use Case Examples

  1. Refreshing a stored ChatKit session to extend its validity before it expires.
  2. Maintaining session continuity in a chatbot integration by refreshing the session token.

Properties

Name Meaning
Resource The type of resource to operate on, here it is 'Session'.
Operation The action to perform on the selected resource, here it is 'Refresh'.

Output

JSON

  • workflowId - The ID of the workflow associated with the refreshed session.
  • session
    • id - The identifier of the refreshed ChatKit session.
    • client_secret - The refreshed client secret for the session, partially obfuscated for security.
    • expires_at - The expiration timestamp of the refreshed session.
  • raw - The raw response data from the ChatKit API for the refresh operation, useful for debugging or further processing.

Dependencies

  • OpenAI ChatKit API

Troubleshooting

  • If the node throws 'No ChatKit session stored' error, ensure a session has been created and stored before attempting to refresh.
  • If the refresh response does not include a client_secret, the operation will fail; verify the API response and credentials.
  • Invalid or missing API credentials will cause authentication errors; ensure the OpenAI ChatKit API key is correctly configured.

Links

Discussion