> For the complete documentation index, see [llms.txt](https://docs.qiro.fi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.qiro.fi/developer-section/qiro-instant-settlement/authentication.md).

# Authentication

Qiro uses OAuth 2.0 client credentials for partner API access.

```http
POST /oauth/token
Authorization: Basic <base64(client_id:client_secret)>
Content-Type: application/x-www-form-urlencoded

grant_type=client_credentials
```

Equivalent sanitized curl form:

```sh
curl -u "${QIRO_CLIENT_ID}:${QIRO_CLIENT_SECRET}" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  --data "grant_type=client_credentials" \
  "${QIRO_API_BASE_URL}/oauth/token"
```

The access token is short-lived. Current tokens are valid for 15 minutes. The partner backend should request a new token when needed and should not expose OAuth client credentials to browsers, wallets, or mobile clients.

## Access token versus wallet signature

The access token authorizes API calls. It does not authorize blockchain transactions.

Every transaction that can move funds still requires the active designated wallet to sign. The SDK receives the access token and a wallet client, verifies Qiro’s prepared transaction, and asks the wallet client to sign only the checked calldata.

## Correlation IDs

`X-Correlation-ID` is a partner trace identifier. It is useful for logs, support, and webhook correlation.

Correlation IDs are not credentials. They do not affect idempotency. Some endpoints require them; others allow Qiro or the SDK to generate one when omitted. Qiro echoes the effective correlation ID in responses.

## Scopes

Tokens include scopes for the resources the partner may access, such as:

* `facilities:read`
* `drawdowns:read`
* `drawdowns:write`
* `repayments:read`
* `repayments:write`
* `closures:read`
* `closures:write`
* `activations:read`
* `activations:write`

The OpenAPI specification file lists the required scope for each enabled route.
