Configuration

Fetch SDK configuration

Changed on

Fetch auth configuration for the SDK. Called by createSunnyChat before establishing a WebSocket connection. Returns Auth0 domain, client ID, token exchange URL, and other partner-specific settings needed to activate the chosen authentication mode.

get/sdk/config

Request

  • Base URL
    https://chat.api.sunnyhealthai-staging.com
  • Auth
    none declared. Required headers: x-sunny-partner-identifier, x-sunny-api-key

Headers

x-sunny-partner-identifierstring required

Partner identifier (e.g., "acme-health")

x-sunny-api-keystring required

Public API key (e.g., "pk-sunnyagents_abc_xyz")

Response

SDK configuration retrieved successfully

Example response

{
  "config": {
    "auth0_domain": "login.sunnyhealthai.com",
    "auth0_client_id": "abc123def456",
    "auth0_connection": "acme-saml",
    "audience": "https://api.sunnyhealthai-staging.com",
    "organization": "org_acme",
    "token_exchange_url": "https://auth.sunnyhealthai-staging.com/oauth/token"
  }
}

Changes