Partner Setup
Before integrating the SDK, you need a public key and partner identifier. These are obtained from Sunny Central, the partner portal where you manage API keys, authentication, and allowed domains.
What is Sunny Central?
Sunny Central is the partner portal for configuring your Sunny Agents integration. It provides:
- API keys — Create and revoke public keys (
pk-sunnyagents_...) for your app - Partner name — Your unique partner identifier used as
partnerIdentifierin the SDK - SDK auth configuration — Client ID, token exchange URL for authenticated sessions
- Allowed domains — CORS origins where your app can embed the chat (required for passwordless)
- CTE profiles — Custom Token Exchange configuration for partner-specific auth flows
Access Sunny Central
Sign in to the partner portal:
- Staging: https://platform.sunnyhealthai-staging.com
- Production: https://platform.sunnyhealthai.com
If you don’t have access, contact your Sunny Health representative.
Get your credentials
1. Create an API key
In Developer Tools → API Keys, create a new public API key. Copy the key value (e.g. pk-sunnyagents_abc_xyz). This is your publicKey for the SDK.
2. Get your partner identifier
Your partner name is shown in the SDK snippets section of Developer Tools. Use it as partnerIdentifier when calling createSunnyChat:
3. Configure authentication
The auth type you can use depends on your Sunny Central configuration:
- Allowed domains: Add your app’s origins (e.g.
https://myapp.com) in Developer Tools → Allowed Domains. Required for passwordless auth. - Token exchange: Contact your Sunny Health representative to configure token exchange in Sunny Central. Once configured, the SDK fetches everything remotely—no params to pass in code.
Next steps
Once you have your credentials:
- Quickstart — Integrate the SDK with
createSunnyChat - Authentication — Learn about auth modes in detail