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

# Authentication

> How to authenticate your API requests

## API Key Authentication

All API endpoints require authentication using your site API key. Include your API key in the request headers:

```bash theme={null}
X-API-Key: YOUR_SITE_API_KEY
```

## Getting Your API Key

1. Log in to [Liquid.tf](https://liquid.tf)
2. Navigate to your Dashboard
3. Go to Settings → API
4. Generate or view your API key

<Warning>
  Keep your API key secure and never share it publicly. Anyone with your API key can manage your listings and trades.
</Warning>

## Example Request

```bash theme={null}
curl "https://api.liquid.tf/api/dev/set_user_agent" \
  -H "X-API-Key: YOUR_SITE_API_KEY"
```

## Security Best Practices

<AccordionGroup>
  <Accordion title="Store keys securely">
    Never commit API keys to version control. Use environment variables or secure secret management systems.
  </Accordion>

  <Accordion title="Rotate keys regularly">
    Regenerate your API key periodically to maintain security.
  </Accordion>

  <Accordion title="Use HTTPS only">
    Always use HTTPS endpoints. HTTP requests will be rejected.
  </Accordion>

  <Accordion title="Monitor usage">
    Regularly check your API usage to detect unauthorized access.
  </Accordion>
</AccordionGroup>

## Troubleshooting

### 401 Unauthorized

Your API key is missing or invalid. Verify that:

* You included the `X-API-Key` header
* The key is correct and hasn't been revoked
* The key belongs to an active account

### 403 Forbidden

Your account doesn't have permission for this action. Check that:

* Your account is in good standing
* You're not banned from marketplace activities
* The endpoint is available for your account type
