<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PassKit",
  "identifier" : "/documentation/PassKit/PKIdentityAuthorizationController/requestDocument(_:completion:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "PassKit (Apple Pay and Wallet)"
    ],
    "preciseIdentifier" : "c:objc(cs)PKIdentityAuthorizationController(im)requestDocument:completion:"
  },
  "title" : "requestDocument(_:completion:)"
}
-->

# requestDocument(_:completion:)

Prompts the user to approve the request to get the identity information.

```
func requestDocument(_ request: PKIdentityRequest, completion: @escaping @Sendable (PKIdentityDocument?, (any Error)?) -> Void)
```

```
func requestDocument(_ request: PKIdentityRequest) async throws -> PKIdentityDocument
```

## Parameters

`request`

The object that contains the identity elements the app requests.

`completion`

The callback the system invokes after retrieving the document, or an error if one occurs.

## Discussion

The user needs to approve the request before releasing any data. When the user approves the request, the system returns the document. If the user doesn’t approve the request, the handler returns a [`PKIdentityError.Code.cancelled`](/documentation/PassKit/PKIdentityError-swift.struct/Code/cancelled) error.

Only one request can be in progress at a time; otherwise, the method returns a [`PKIdentityError.Code.requestAlreadyInProgress`](/documentation/PassKit/PKIdentityError-swift.struct/Code/requestAlreadyInProgress) error.

Your app’s `Info.plist` file needs to provide a message for the `NSIdentityUsageDescription` key. If this key is missing, any attempt to request a document fails.

---

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)