# `connection.key_invalid`

Connection gives a key its package doesn't take.

Area 11, [External services](../topics/external-services.md); not declinable; the next step is usually the agent's.

Where an API is comes from exactly one place, so a package with fixed
`hosts:` takes no `host:`; a key the package doesn't take, or no
connection takes, is refused the same way:






```jadpo
application {
    connections: {
        couriers: {
            package: AcmeCouriers.v1
            domains: [shipping]
            environment: config.couriers_environment
            host: config.couriers_address
        }
    }
}
```

```text
error: `couriers` gives `host:`, but `AcmeCouriers.v1` has fixed hosts
 --> app.jadpo:7:13
  |
7 |             host: config.couriers_address
  |             ^^^^ a second place for its address
  reason: Where an API is comes from exactly one place: `AcmeCouriers.v1`'s `hosts:` give its live and sandbox addresses, and `environment:` chooses between them.
  next: Remove `host:` (agent)
  rule: connection.key_invalid
  help: https://jadpo.dev/docs/errors/connection.key_invalid

check failed: 1 error, 6 files
```
