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

# Get API keys

> Retrieve your account's public key and secret key.

<Info>
  Your `SECRET_KEY` is required on every authenticated API request. If you have lost your key, retrieve it here and update your environment variables.
</Info>

## Endpoint

```
GET /clients/settings/get-keys
```

## Headers

<ParamField header="Authorization" type="string" required>
  `Bearer YOUR_ACCESS_TOKEN`
</ParamField>

<ParamField header="SECRET_KEY" type="string" required>
  Your current API secret key. Required to authenticate this request.
</ParamField>

<ParamField header="businessId" type="string" required>
  Your business ID.
</ParamField>

## Response

<ResponseField name="status" type="boolean">
  `true` on success.
</ResponseField>

<ResponseField name="message" type="string">
  Human-readable outcome.
</ResponseField>

<ResponseField name="data.publicKey" type="string">
  Your account's public key.
</ResponseField>

<ResponseField name="data.secretKey" type="string">
  Your account's secret key. Treat this like a password — never expose it in client-side code or logs.
</ResponseField>

## Code examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET https://sandbox.stellasbank.com/api/v1/clients/settings/get-keys \
    -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
    -H "SECRET_KEY: YOUR_SECRET_KEY" \
    -H "businessId: YOUR_BUSINESS_ID"
  ```

  ```js Node.js theme={null}
  const res = await fetch(
    "https://sandbox.stellasbank.com/api/v1/clients/settings/get-keys",
    {
      headers: {
        Authorization: "Bearer YOUR_ACCESS_TOKEN",
        SECRET_KEY: "YOUR_SECRET_KEY",
        businessId: "YOUR_BUSINESS_ID",
      },
    }
  );
  const { data } = await res.json();
  ```

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

  res = requests.get(
      "https://sandbox.stellasbank.com/api/v1/clients/settings/get-keys",
      headers={
          "Authorization": "Bearer YOUR_ACCESS_TOKEN",
          "SECRET_KEY": "YOUR_SECRET_KEY",
          "businessId": "YOUR_BUSINESS_ID",
      },
  )
  print(res.json()["data"])
  ```
</CodeGroup>

## Example response

```json theme={null}
{
  "status": true,
  "message": "Keys retrieved successfully",
  "data": {
    "publicKey": "pk_live_abc123",
    "secretKey": "sk_live_xyz789"
  }
}
```
