WIDGET

Authenticated sessions

Logged-in users and private chatbot actions.

Server creates session

  • curl -X POST "$API/widget/sessions/authenticated" \
  • -H "Authorization: Bearer $SC_LIVE_SECRET" \
  • -H "X-StartupCore-Api-Key-Id: $API_KEY_ID" \
  • -H "Content-Type: application/json" \
  • -d '{"botId":"bot_123","externalUserId":"user_42","email":"user@example.com"}'

SDK (Node/BFF)

  • const { sessionToken } = await startupCore.widget.createAuthenticatedSession(
  • { botId, externalUserId, email },
  • { serverApiKey: { keyId: process.env.SC_KEY_ID!, secret: process.env.SC_SECRET! } },
  • );