> ## Documentation Index
> Fetch the complete documentation index at: https://rain-sandbox-trial.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Set Up Access

> Accept your Dashboard invite, get your API keys, choose the SDK or REST, and authenticate your requests to Rain.

Before you build, you need access to the Rain Dashboard and a way to
authenticate your API requests. This guide walks you through accepting your
invite, finding your API keys, choosing between the SDK and the REST API, and
authenticating your first call.

## Before you begin

Identify your [program type and management model](/docs/first-steps), since they
shape which guides and API references apply to your build.

Rain provides separate instances for sandbox and production. Use the sandbox to
build and test your integration, then switch to production when you go live.

<Steps>
  <Step title="Accept your Dashboard invite">
    Your access depends on the environment:

    * **Sandbox:** Rain creates a sandbox account for you and sends an email
      invite from the implementation team. Accept it to reach your
      **Developer Dashboard**.
    * **Production:** When you're ready to go live, you need a Rain Spend
      account. [Sign up for a production account](https://use.rain.xyz/signup).

    If you can't see the Issuing page after accepting your invite, contact
    [platform@rain.xyz](mailto:platform@rain.xyz).
  </Step>

  <Step title="Get your API keys">
    Open the **Config** page in the Dashboard to retrieve your API key and
    secret:

    * [Sandbox Config page](https://use-dev.rain.xyz/issuing/config)
    * [Production Config page](https://use.rain.xyz/issuing/config)

    You use these keys to authenticate every API request. A new key defaults to
    the `admin` role, which has full access. To create keys with narrower
    access, rotate keys, or restrict a key to specific IP addresses, see
    [Authenticating with the API](/reference/authenticating-with-the-api).
  </Step>

  <Step title="Choose the SDK or REST">
    Decide how you want to call the API:

    * **SDK:** The Rain SDK is available for TypeScript and Python and gives you
      type safety, IDE autocomplete, and a consistent interface. See the
      [SDK overview](/sdks/overview) to install it and make your first call.
    * **REST:** The SDK is optional. You can make the same calls directly to the
      Rain REST API using any HTTP client.

    Install the SDK if you want to use it:

    <CodeGroup>
      ```bash TypeScript theme={null}
      npm install @rainapi/rain-sdk
      ```

      ```bash Python theme={null}
      pip install rain-sdk
      ```
    </CodeGroup>
  </Step>

  <Step title="Authenticate your requests">
    Include your API key in the `Api-Key` header on every request:

    ```bash theme={null}
    curl -X GET "https://api.rain.xyz/v1/example" \
         -H "Api-Key: YOUR_API_KEY"
    ```

    With the SDK, pass your API key when you initialize the client and choose
    your environment:

    <CodeGroup>
      ```ts TypeScript theme={null}
      import Rain from '@rainapi/rain-sdk';

      const client = new Rain({
        apiKey: process.env['RAIN_API_KEY'],
        environment: 'dev', // use 'production' for live
      });
      ```

      ```python Python theme={null}
      import os

      from rain_sdk import Rain

      client = Rain(
          api_key=os.environ["RAIN_API_KEY"],
          environment="dev",  # use "production" for live
      )
      ```
    </CodeGroup>

    <Warning>
      Never expose API keys in client-side code such as JavaScript or mobile
      apps. Always use HTTPS so your keys can't be intercepted.
    </Warning>
  </Step>
</Steps>

## What's next

<Columns cols={3}>
  <Card title="Connect webhooks" icon="bell" href="/docs/webhooks">
    Set your webhook URL and verify signatures so you catch events from your
    first call.
  </Card>

  <Card title="Onboard a cardholder" icon="user-check" href="/docs/signing-up-a-customer">
    Submit a KYC or KYB application and confirm approval.
  </Card>

  <Card title="Authenticating with the API" icon="key" href="/reference/authenticating-with-the-api">
    See API key roles, rotation, and IP restrictions in full.
  </Card>
</Columns>
