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

# Get API Key

> How to obtain API keys for sandbox and production environments

<script type="text/javascript" id="hs-script-loader" async defer src="//js.hs-scripts.com/46106422.js" />

To use the WattShift API, you'll need to obtain API keys for your chosen environment. Follow the instructions below based on whether you're using the sandbox or production environment.

## Sandbox Environment

For testing and development purposes, use the sandbox environment:

1. Navigate to [https://partner-sandbox.wattshift.com/](https://partner-sandbox.wattshift.com/)
2. Signup / Log in to your sandbox account
3. Click on the **Keys** menu in the navigation
4. Generate your sandbox API keys

<Note>
  Sandbox API keys are for testing purposes only and should not be used in
  production applications.
</Note>

## Production Environment

For production applications, use the production environment:

1. Navigate to [https://partner.wattshift.com/](https://partner.wattshift.com/)
2. Signup / Log in to your production account
3. Click on the **Keys** menu in the navigation
4. Generate your production API keys

<Note>
  Production API keys have access to real user data and should be kept secure.
  Never commit API keys to version control or share them publicly.
</Note>

## Using Your API Keys

Once you have your API keys, you can use them to authenticate your API calls as shown in the [authentication guide](/docs/get_started/authentication).

```typescript theme={null}
const options = {
  method: "POST",
  headers: {
    "x-ws-api-key": "<your api key here>",
  },
};
```

<Note>
  Make sure to use the correct base URL for your environment as described in the
  [environments guide](/docs/get_started/environments).
</Note>
