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

# API credentials

> Create and manage OAuth2 client credentials in the Portal.

You create OAuth2 **client credentials** — a client ID and client secret — in the Portal UI. You then
exchange them for an access token (see [Authentication](https://developers.vibrant-wellness.com/authentication.md)).

> [!NOTE]
>
> The Portal credentials screen is a **placeholder** in this preview. The flow below reflects the
> intended experience; screens and exact labels may change.

## Create credentials

**1. Open API credentials**

In the Portal, go to **Settings → API credentials**.

**2. Create a client**

Click **Create client**, name it (e.g. "Billing integration — production"), choose the environment
(**Staging** or **Production**), and pick the scopes it may request (e.g. `result`, `report`).

**3. Copy the secret once**

The **client secret** is shown **only once** at creation. Copy it into your secret manager
immediately — you can't retrieve it later, only rotate it. The **client ID** stays visible.

![API credentials screen placeholder](https://mintcdn.com/vibrant-8ddfe82e/S0AZ5CIJgM1r_bu8/images/api-credentials-placeholder.svg?fit=max\&auto=format\&n=S0AZ5CIJgM1r_bu8\&q=85\&s=9e644a3ae83faf874eeb6d4db9695aee)

Portal → Settings → API credentials (placeholder)

## Environments

| Environment | Use |
| :- | :- |
| Production | Live orders against real data. |
| Staging | Development and testing against staging data. |

One client covers the **entire API** — ordering and results alike. Scopes are toggles on that
client, never separate credentials, and secrets are opaque strings with no special format.

## Rotate & revoke

* **Rotate** to replace a secret without downtime: create a new client (or new secret), deploy it,
  then revoke the old one.
* **Revoke** immediately if a secret may be exposed. Tokens issued from a revoked client stop working;
  requests using them return `401`.

> [!WARNING]
>
> Revoking breaks any integration still using that client. Roll out the replacement before you revoke.

## Next

> [card] [Authentication](https://developers.vibrant-wellness.com/authentication.md)
>
> Exchange your credentials for an access token and make your first call.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.