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

# Configure Credentials

> Set up the SIWE domain, publishable keys, and API keys your app needs to talk to Blend's SDK and API.

Set up the credentials your app needs to talk to Blend's SDK and API.

## SIWE domain

The SIWE domain tells Blend which domain is allowed to sign in users via wallet signatures. Without it, frontend authentication won't work.

<Steps>
  <Step title="Go to credentials">
    Open **Settings > Credentials** in the portal.
  </Step>

  <Step title="Add your domain">
    Enter your app's domain in the SIWE field. Use the format `yourdomain.com` or `yourdomain.com:3000` for local dev. Blend normalizes this to lowercase.
  </Step>

  <Step title="Save and verify">
    Save the domain. The SIWE challenge messages will now include this domain, and wallets will show it during sign-in. Users see your domain name, not Blend's.
  </Step>
</Steps>

<Warning>
  Frontend SDK authentication will fail without a SIWE domain. Set this up before writing any SDK code.
</Warning>

## Publishable keys

Every account type gets its own publishable key. This key identifies your account type in frontend SDK calls. It's safe to include in client-side code.

Publishable keys look like `pk_live_` followed by 64 hex characters. You'll find them on the account type detail page under **Settings**.

Pass the publishable key when you create the SDK:

```ts sdk-init.ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
import {
  BlendSdk,
  getPimlicoPaymasterEndpoints,
} from "@blend-money/fe";

const sdk = new BlendSdk({
  publishableKey: "pk_live_a1b2c3d4e5f6...",
  signMessage: (message) => wallet.signMessage({ message }),
  paymaster: getPimlicoPaymasterEndpoints("your-pimlico-key"),
});
```

Each account type has a different publishable key. If you have multiple account types, such as a conservative and an aggressive product, use a different key for each. SDK 3.0.1 requires the frontend `paymaster` registry and gets gas pricing from its configured bundler. The server SDK does not use paymaster configuration.

## API keys

API keys authenticate server-to-server calls. They're secrets - never expose them in frontend code or version control.

<Steps>
  <Step title="Create an API key">
    Go to **Settings > Credentials** and click **Create API Key**. Give it a name you'll recognize (like "production-server" or "staging").
  </Step>

  <Step title="Copy the secret">
    The full secret is shown once. Copy it and store it in your server's environment variables. The key looks like `sk_live_` followed by a long random string.

    <Warning>
      You won't see this secret again. If you lose it, create a new key and deactivate the old one.
    </Warning>
  </Step>

  <Step title="Use it in your server SDK">
    Pass the API key when you create the server SDK:

    ```ts server-init.ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
    import { BlendServerSdk } from "@blend-money/node";

    const sdk = new BlendServerSdk({
      apiKey: process.env.BLEND_API_KEY,
      accountTypeId: "savings-usdc",
    });
    ```
  </Step>
</Steps>

## Key rotation

Rotate keys when team members leave, when a key may have been exposed, or on a regular schedule.

**Publishable keys** can't be rotated independently. They're tied to the account type. If you need a new publishable key, contact Blend support at [hello@blend.money](mailto:hello@blend.money).

**API keys** can be rotated in the portal. Create a new key, update your server, then deactivate the old one. You can have multiple active API keys during the transition.

**Signing key rotation** invalidates all active SDK sessions. Every signed-in user will need to sign in again. The portal limits this to 3 rotations per hour. Only rotate the signing key if you suspect it's been compromised.

<CardGroup cols={2}>
  <Card title="Make your first deposit" icon="code" href="/build/first-deposit">
    Use your new credentials to make a deposit in under 30 minutes.
  </Card>

  <Card title="Portal operations" icon="browser" href="/build/portal/operations">
    Manage flow plans, team members, and audit logs day-to-day.
  </Card>
</CardGroup>
