Skip to main content
Glama
chatkit.ts•573 B
export default async function getChatKitSessionToken( deviceId: string ): Promise<string> { const response = await fetch("https://api.openai.com/v1/chatkit/sessions", { method: "POST", headers: { "Content-Type": "application/json", "OpenAI-Beta": "chatkit_beta=v1", Authorization: "Bearer " + process.env.VITE_OPENAI_API_SECRET_KEY, }, body: JSON.stringify({ workflow: { id: "wf_68e529eb0640819090a8f0ba72818fed05f5ce8779030bc7" }, user: deviceId, }), }); const { client_secret } = await response.json(); return client_secret; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/danilonovaisv/n8n-workflow-builder-GPT'

If you have feedback or need assistance with the MCP directory API, please join our Discord server