---
title: HMAccessorySetupPayload
framework: homekit
role: symbol
role_heading: Class
path: homekit/hmaccessorysetuppayload
---

# HMAccessorySetupPayload

A payload for authenticating a HomeKit accessory.

## Declaration

```swift
class HMAccessorySetupPayload
```

## Overview

Overview The setup payload provides a URL to authenticate an accessory. Typically, the URL comes from scanning a QR code on the accessory. Use a setup payload to authenticate devices that are already deployed, for which scanning a QR code would be difficult, or if you need to provide an optional ownership token that you negotiate with the accessory outside of HomeKit. For details about the payload’s content, please join the MFi Program.

## Topics

### Creating a Payload

- [init(url:)](homekit/hmaccessorysetuppayload/init(url:)-7ytm5.md)
- [init(url:ownershipToken:)](homekit/hmaccessorysetuppayload/init(url:ownershiptoken:)-32mrj.md)
- [HMAccessoryOwnershipToken](homekit/hmaccessoryownershiptoken.md)

### Initializers

- [init(URL:)](homekit/hmaccessorysetuppayload/init(url:)-j8tu.md)
- [init(URL:ownershipToken:)](homekit/hmaccessorysetuppayload/init(url:ownershiptoken:)-24qin.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
