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

# Authentication

> How to get and use a Bearer token for the switching service.

# Authentication

Use your application credentials to get a JWT access token.
The switch uses the token to identify your application on protected endpoints.

## Get a token

```bash theme={null}
curl -X POST https://staging-switch.yourflexpay.com/api/v1/auth/token \
  -H 'Content-Type: application/json' \
  -d '{
    "client_id": "<clientId>",
    "client_secret": "<clientSecret>"
  }'
```

## Use the token

Send the token as a Bearer header on all protected requests:

```text theme={null}
Authorization: Bearer <token>
```

## What the token authorizes

* Route transactions
* Create and resolve paytags
* Receive transaction webhooks
* Query wallet and settlement information

## Related topics

* [Quickstart](/switch/quickstart)
* [Integration guide](/switch/integration-guide)
