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

# Credentials and authentication

> Set up API credentials in Remapdb, store them safely, and rotate them without breaking your integration.

Use this page to connect your backend to Remapdb with a safe credential workflow.

## Where to find credentials

Click the [**API**](https://app.remapdb.com/api) item in the main navigation.

In the **Credentials** section, you will see:

* `API key`
* `API secret`
* **Copy** buttons
* **Generate new credentials** button

<Info>
  If credentials are disabled, your account does not currently have API access. Open [Plan access](/api/plan-access).
</Info>

## Set up credentials

<Steps>
  <Step title="Copy both credential values">
    Click the **Copy** button next to `API key`, then click the **Copy** button next to `API secret`.
  </Step>

  <Step title="Store credentials in your server environment">
    Save both values in secure server-side environment variables or your secret manager.
  </Step>

  <Step title="Connect your backend service">
    Configure your backend to read the stored credentials and use them for API requests.
  </Step>

  <Step title="Run one test request in staging">
    Confirm authentication works in staging before you send production traffic.
  </Step>
</Steps>

<Info>
  Your API key is also used for MCP-based AI tool setup. Set it as `REMAPDB_API_KEY` when you follow [AI Integrations](/api/ai-integrations).
</Info>

## Rotate credentials safely

Clicking the **Generate new credentials** button creates a new key and secret pair.

<Warning>
  Rotation is immediate. As soon as you generate new credentials, old credentials stop working.
</Warning>

Use this rotation order:

<Steps>
  <Step title="List every service that uses current credentials">
    Include web app backend, workers, scheduled jobs, and any integration scripts.
  </Step>

  <Step title="Generate the new credentials in Remapdb">
    Click the **Generate new credentials** button in the API page.
  </Step>

  <Step title="Update credentials in every environment">
    Replace old values in staging and production secret storage.
  </Step>

  <Step title="Reload services">
    Restart or redeploy services so they read the new values.
  </Step>

  <Step title="Run a smoke test">
    Confirm your key requests succeed and no authentication errors appear in logs.
  </Step>
</Steps>

## Common issues

* Credentials are disabled: open [Plan access](/api/plan-access).
* Requests started failing right after rotation: one or more services still use old credentials.
* Staging works but production fails: compare environment variables between both environments.

## Related actions

* [API](/api)
* [AI Integrations](/api/ai-integrations)
* [Usage limits](/api/usage-limits)
