# Authentication

## Audience

Partner organizations and software acting on their behalf: insurance carriers, dental plans, dental
brands, and other organizations that exchange practice, location, and provider data with Intelibly.
Intelibly does not offer an API for patients or for individual consumers.

## Registration

There is no registration endpoint and no self-service sign-up. Intelibly provisions credentials for
each partner organization:

- Ask your Intelibly Provider Relations representative, or use the
  [contact form](https://intelibly.com/contact).
- Credentials belong to the partner organization, not to an individual user or agent. Every request
  made with them is attributed to that partner, and the credentials determine which partner's data
  can be accessed.

## Supported methods

| API | Method | Credential |
| --- | --- | --- |
| Partner CSV Upload API | OAuth 2.0 client credentials grant | `client_id` and `client_secret`, exchanged at `POST https://app.intelibly.com/api/token` for a Bearer access token valid about 1 hour |
| Provider Information Updates API | Static bearer token | Partner API token issued by Intelibly |

## Using credentials

- Call `https://app.intelibly.com` over HTTPS only, with `Authorization: Bearer <token>`.
- Request a new access token when `expires_in` elapses. On a `401` response, get a new token rather
  than retrying with the old one.
- Read `client_secret` and API tokens from environment variables or a secrets manager. Never put
  them in prompts, shared code, client-side apps, or public repositories.
- If a credential may be compromised, contact Intelibly to rotate it.

## Not available

Dynamic client registration, ID-JAG, verified-email, and anonymous agent registration are not
supported.

## Discovery metadata

- Protected resource metadata (RFC 9728):
  [app.intelibly.com/.well-known/oauth-protected-resource](https://app.intelibly.com/.well-known/oauth-protected-resource)
- Authorization server metadata (RFC 8414):
  [intelibly.com/.well-known/oauth-authorization-server](https://intelibly.com/.well-known/oauth-authorization-server)
