> The index of all pages is at https://docs.afffast.com/llms.txt.

# connection_credentials_invalid

The credentials do not match the network.

HTTP status: **422**. Error type: `invalid_request_error`.

The credentials do not match the network.

## Example

```json
{
  "error": {
    "type": "invalid_request_error",
    "code": "connection_credentials_invalid",
    "message": "The credentials do not match the network.",
    "param": "credentials.apiToken",
    "doc_url": "https://docs.afffast.com/errors/connection-credentials-invalid",
    "request_id": "req_3kQ9x7WmZpL2vNd8TfYb4A"
  }
}
```

## Causes

- A credential field is missing, or it has a value that the network does not accept in this form.
- The credentials have a field that the network does not have.
- The check with the network failed (`POST /v1/connections/test`).

## How to fix

- Read `error.param`. It names the field, for example `credentials.apiToken`.
- Get the fields of the network with `GET /v1/networks/{id}` (`credential_fields`). Read the guide [Connect a network](https://docs.afffast.com/docs/connect.md) for where to find each value.
- Send `POST /v1/connections/test` to check the values before you save them.
