<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "watchOS: 7.3.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "NearbyInteraction",
  "identifier" : "/documentation/NearbyInteraction/NIError/Code/invalidConfiguration",
  "metadataVersion" : "0.1.0",
  "role" : "Case",
  "symbol" : {
    "kind" : "Case",
    "modules" : [
      "Nearby Interaction"
    ],
    "preciseIdentifier" : "c:@E@NIErrorCode@NIErrorCodeInvalidConfiguration"
  },
  "title" : "NIError.Code.invalidConfiguration"
}
-->

# NIError.Code.invalidConfiguration

An error code that indicates that the nearby-interaction configuration isn’t valid.

```
case invalidConfiguration
```

## Discussion

The framework invalidates a session with this error code if the app provides an invalid discovery token to the [`init(peerToken:)`](/documentation/NearbyInteraction/NINearbyPeerConfiguration/init(peerToken:)) initializer.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)