> ## Documentation Index
> Fetch the complete documentation index at: https://developer.suki.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Provider Register or Login Fails

> Fix Register and Login failures including provider_not_registered and Partner Token errors

[Register](/api-reference/authentication/register) creates a provider in Suki or links an existing provider to your partner organization. [Login](/api-reference/authentication/login) exchanges a Partner Token for a Suki Token (`suki_token` / `sdp_suki_token`). If these calls fail, every later Partner API session call fails too.

## Expected flow

<Steps>
  <Step title="Register When Needed">
    Call Register once for a new provider, or when you link a provider to your partner organization. SDKs can set `autoRegister` so registration runs during sign-in when the user does not already exist.
  </Step>

  <Step title="Call Login">
    Send `partner_id` and `partner_token` in the Login body. For Bearer and Single Auth Token partners, also send `provider_id` when required. Standard provider authentication omits `provider_id` when that is your assigned mode.
  </Step>

  <Step title="Use the Suki Token">
    Store `suki_token` and send it as the `sdp_suki_token` header on later REST and WebSocket calls. The token is valid for **1 hour**. Call Login again to refresh.
  </Step>
</Steps>

<Note>
  If you are unsure whether you use Standard, Bearer, or Single Auth Token authentication, ask your Suki partnership team before you retry Register and Login.
</Note>

## Errors to match

| Error or message | HTTP | Meaning | Fix |
| :- | :- | :- | :- |
| `provider_not_registered` | 401 | Clinician not registered via `/auth/register` | Call Register, then Login. On Headless, enable `autoRegister` if you want the SDK to create the account during sign-in |
| `provider_user_inactive` | 412 | Provider user is not ACTIVATED/LICENSE\_PENDING | Contact Suki support or your partnership team |
| Missing required identifier claim | 400 | Partner Token missing the user identifier claim from onboarding | Include `sub`, `email`, or the custom claim you registered as primary |
| Token validation failed | 401 | Partner Token failed validation | Check `exp`, `iss`, `aud`, user identifier, RS256 signature, and JWKS |
| Unknown partner identifier | 400 | Wrong Partner ID | Use the Partner ID from onboarding |
| Malformed token | 400 | JWT not in `header.payload.signature` form | Fix encoding and `alg` (RS256) |

## Common causes

* Partner Token is expired, missing required claims, or signed with a key Suki cannot verify.
* Register was never called, and SDK `autoRegister` is off.
* `provider_id` is missing when your partner type requires it on Login, or it does not match the clinician you registered.
* Staging Partner ID or token against production hosts, or the reverse.

## Fix

<Steps>
  <Step title="Validate the Partner Token">
    Decode the JWT and confirm required claims (`exp`, `iss`, `aud`, user identifier). Confirm your JWKS URL is publicly reachable. See [Partner authentication troubleshooting](/documentation/how-to/partner-authentication#troubleshooting).
  </Step>

  <Step title="Register the Clinician">
    Call `POST /api/v1/auth/register` with `partner_id` and `partner_token` (and provider fields your mode requires). Reuse a stable `provider_id` when your flow uses one.
  </Step>

  <Step title="Login and Store sdp_suki_token">
    Call Login, then send `sdp_suki_token` on later calls. Refresh with Login before the 1 hour lifetime ends.
  </Step>

  <Step title="Match the Environment">
    Use the same staging or production host for Register, Login, and session APIs (`https://sdp.suki-stage.com` or `https://sdp.suki.ai`). See [Wrong staging vs production endpoints](/documentation/troubleshooting/wrong-environment-endpoints).
  </Step>
</Steps>

<Tip>
  Walkthroughs: [Register a provider then log in](/documentation/cookbooks/register-then-login) and [Pass Provider ID on login](/documentation/cookbooks/bearer-provider-id-on-login).
</Tip>

## Next steps

<Icon icon="file-lines" iconType="solid" /> **[Partner authentication](/documentation/how-to/partner-authentication)** - Modes, JWT requirements, and auth troubleshooting

<Icon icon="file-lines" iconType="solid" /> **[Login](/api-reference/authentication/login)** - Exchange Partner Token for Suki Token

<Icon icon="file-lines" iconType="solid" /> **[Ambient and Dictation error messages](/api-reference/error-messages)** - `provider_not_registered`, `provider_user_inactive`, and related ids

<Icon icon="file-lines" iconType="solid" /> **[401 Unauthorized or invalid Partner Token](/documentation/troubleshooting/invalid-partner-token-401)** - Partner Token vs `invalid_sdp_token`

<Icon icon="file-lines" iconType="solid" /> **[InvalidPartnerDetails during sign-in or registration](/documentation/troubleshooting/invalid-partner-details)** - Headless SDK credential errors
