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

# Authentication

> How to authenticate REST API requests

All REST API endpoints require authentication via Bearer token.

### Getting Credentials

See the [TypeScript Starter Kit](/quickstart/typescript-starter-kit) for step-by-step instructions on:

1. [Creating an API Wallet](/quickstart/typescript-starter-kit#create-api-wallet), a separate wallet for signing API transactions (not your main login wallet).
2. Getting a Bearer Token from [Geomi](https://geomi.dev/docs/start).

### Using Authentication

Include two headers with every authenticated request: Origin (your application's origin URL) and Authorization (Bearer token from Geomi, see above)

```bash theme={null}
curl -H "Origin: https://netna-app.decibel.trade/trade" \
     -H "Authorization: Bearer <KEY>" \
     https://api.netna.aptoslabs.com/decibel/
```

Replace `<KEY>` with your Bearer token from Geomi.

## Security Best Practices

* Never commit tokens to version control
* Use environment variables in your code
* Rotate tokens periodically

## Related

<CardGroup cols={2}>
  <Card title="TypeScript Starter Kit" href="/quickstart/typescript-starter-kit">
    Step-by-step guide to creating API credentials
  </Card>

  <Card title="Error Handling" href="/api-reference/rest/errors">
    How to handle authentication errors
  </Card>
</CardGroup>
