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

# API Overview

> High-level overview of hConnect’s two surfaces: OIDC OP endpoints and REST API, with separate base URLs, auth, and usage.

<Info>
  hConnect exposes two distinct surfaces:

  * <b>OIDC OP (OpenID Provider)</b>: Standard OIDC endpoints (authorization, token, userinfo, jwks) for browser-based sign-in flows.
  * <b>REST API</b>: Server-to-server endpoints for provider discovery and verification lifecycle.

  They use different base URLs and authentication methods.
  Keep them conceptually separate in your integration.
</Info>

## Quick Links

<CardGroup>
  <Card title="OIDC OP Endpoints" icon="key" href="/api-reference/oidc/well-known">
    Authorization, Token, UserInfo, JWKS and discovery document
  </Card>

  <Card title="REST API Endpoints" icon="terminal" href="/api-reference/providers/get-providers">
    Providers list and Verification lifecycle endpoints
  </Card>

  <Card title="Error Codes" icon="shield-check" href="/api-reference/error-codes">
    Unified error model and handling strategies
  </Card>
</CardGroup>

## Environments

Sandbox (testing) and Production (live) are provided for both OIDC and REST.

<Card title="Environment Details" icon="server" href="/guides/concepts/environments">
  Compare Sandbox vs Production and find all canonical URLs
</Card>

***

## OIDC OP Overview

OIDC endpoints are served from the Connect domain and follow the OpenID Provider discovery standard.

### Base URLs

<CodeGroup>
  ```bash Production theme={null}
  ISSUER=https://connect.hopae.com
  AUTHORIZATION_ENDPOINT=https://connect.hopae.com/auth
  TOKEN_ENDPOINT=$ISSUER/token
  USERINFO_ENDPOINT=$ISSUER/userinfo
  JWKS_URI=$ISSUER/jwks
  WELL_KNOWN=$ISSUER/.well-known/openid-configuration
  ```

  ```bash Sandbox theme={null}
  ISSUER=https://sandbox.connect.hopae.com
  AUTHORIZATION_ENDPOINT=https://sandbox.connect.hopae.com/auth
  TOKEN_ENDPOINT=$ISSUER/token
  USERINFO_ENDPOINT=$ISSUER/userinfo
  JWKS_URI=$ISSUER/jwks
  WELL_KNOWN=$ISSUER/.well-known/openid-configuration
  ```
</CodeGroup>

### Authentication & Flows

* OAuth2/OIDC flows (Authorization Code with PKCE recommended)
* Client authentication and scopes configured per application

***

## REST API Overview

REST endpoints are served from the API domain and use Basic Auth for server-to-server calls.

### Base URLs

<CodeGroup>
  ```bash Production theme={null}
  API_BASE_URL=https://api.hopae.com
  ```

  ```bash Sandbox theme={null}
  API_BASE_URL=https://sandbox.api.hopae.com
  ```
</CodeGroup>

### Authentication

Use Basic Authentication with your Client ID and Client Secret.

<Info>
  In the API playground, set `Authorization.username` to your Client ID (`client_id`) and `Authorization.password` to your Client Secret (`client_secret`). The header is generated automatically.
</Info>

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "$API_BASE_URL/connect/v1/providers" \
    -u "CLIENT_ID:CLIENT_SECRET"
  ```

  ```javascript Node.js theme={null}
  const credentials = Buffer.from("CLIENT_ID:CLIENT_SECRET").toString("base64");
  await fetch(`${process.env.API_BASE_URL}/providers`, {
    headers: { Authorization: `Basic ${credentials}` },
  });
  ```

  ```python Python theme={null}
  import base64, os, requests
  creds = base64.b64encode(b'CLIENT_ID:CLIENT_SECRET').decode('utf-8')
  resp = requests.get(
      f"{os.environ['API_BASE_URL']}/providers",
      headers={"Authorization": f"Basic {creds}"}
  )
  ```
</CodeGroup>

### Versioning

Current REST API version: `v1` (included in the path).

```
https://sandbox.api.hopae.com/connect/v1/[endpoint]
```

### Common Headers

| Header          | Value                                     | Description                    |
| --------------- | ----------------------------------------- | ------------------------------ |
| `Authorization` | `Basic <base64(client_id:client_secret)>` | Your API credentials           |
| `Content-Type`  | `application/json`                        | Required for POST/PUT requests |

## Support

📧 [dev@hopae.com](mailto:dev@hopae.com)
