partner_token for all clinicians instead of generating a unique token for each user through their identity provider. Suki refers to this authentication model as Single Auth Token authentication.
In this model, your backend authenticates every request using the same partner_token. Because the token identifies your organization rather than an individual clinician, you must provide the clinician’s identity separately.
With Single Auth Token authentication, include the clinician identifier on every request:
- Pass
provider_idin the request body when calling Register and Login. - Pass
sdp_provider_idas an HTTP header on every subsequent REST API request and WebSocket connection.
Important
-
Single Auth Token authentication is different from Bearer partner authentication. Bearer partners send
provider_idonly during Register and Login. Single Auth Token partners must also sendsdp_provider_idon every subsequent REST API request and WebSocket connection. - A partner can use either Bearer partner authentication or Single Auth Token authentication, but not both.
- Suki assigns your authentication model during onboarding. If you are unsure which authentication model your organization uses, contact your Suki partnership team.
Prerequisites
Before you implement Single Auth Token authentication, confirm the following:- Single Auth Token configuration: Your Suki partnership team confirms that your organization uses Single Auth Token authentication.
- Stable clinician identifiers: Your application already knows the active clinician from your session, EHR, or user directory. Use the same stable
provider_idfor that clinician on every Register, Login, and later API request. - HTTPS required: Send Login and Register as HTTPS POST requests with a JSON body. Do not send credentials in query parameters.
How this authentication model differs
Single Auth Token partners authenticate the same way as other partners by sendingpartner_token, but clinician identity is not derived from that token. You provide the clinician identity separately through provider_id and sdp_provider_id.
Single Auth Token authentication behavior
- Register and Login identify the clinician using
provider_idbecause the sharedpartner_tokenidentifies your organization, not the clinician. - After Login, send
sdp_provider_idon every subsequent REST API request and WebSocket connection. The token authorizes your organization.sdp_provider_idtells Suki which clinician is acting. - Use the same stable
provider_idfor a clinician on Register, Login, and latersdp_provider_idheaders. - A partner can use either Bearer partner authentication or Single Auth Token authentication, but not both.
Typical flow
1
Register each clinician once with Register. Use a stable
provider_id for that person.2
Login with Login. Send your
partner_id, shared partner_token, and the active clinician’s provider_id.3
Call Suki APIs with the
sdp_suki_token returned from Login. Include the sdp_provider_id header on every REST and WebSocket request.4
Refresh the token before it expires (1 hour). Call Login again with the same
partner_token and provider_id.Send sdp_provider_id with all API requests
When you use Single Auth Token authentication, include thesdp_provider_id header on every Suki API request after Login.
- Register and Login: Your app already knows which clinician is signing in. Send that person’s identifier as
provider_idso Suki can register or authenticate them. - All other APIs: After Login, send
sdp_provider_idon every REST and WebSocket request along withsdp_suki_token. Suki uses it to route the request to the correct clinician.
Register each provider with a stable
provider_id before their first Login. If Login fails because the provider is not registered, call Register, then call Login again.Login and Register request fields
Single Auth Token partners use the same Login and Register endpoints as standard partners. You must includeprovider_id on every Login and Register call.
Login
Endpoint: LoginMethod: POST
Example request
Register
Register a provider once before their first Login. Refer to Provider authentication for new user, existing user, and conflict responses.Endpoint: RegisterMethod: POST