<!--
{
  "availability" : [
    "macOS: 10.7.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVPlayerItem/requestContentAuthorizationAsynchronously(withTimeoutInterval:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVPlayerItem(im)requestContentAuthorizationAsynchronouslyWithTimeoutInterval:completionHandler:"
  },
  "title" : "requestContentAuthorizationAsynchronously(withTimeoutInterval:completionHandler:)"
}
-->

# requestContentAuthorizationAsynchronously(withTimeoutInterval:completionHandler:)

Presents the user the opportunity to authorize the content for playback.

```
func requestContentAuthorizationAsynchronously(withTimeoutInterval timeoutInterval: TimeInterval, completionHandler handler: @escaping @Sendable () -> Void)
```

## Parameters

`timeoutInterval`

The maximum amount of time in seconds to wait for the user to authorize the content before calling the handler block with a timeout result.

`handler`

The block to be called upon completion.

## Discussion

Calling this method will present the user with the opportunity to authorize the content (for example, by launching iTunes and prompting the user to enter their Apple ID and password).

When the user has taken action (or the timeout has elapsed), the completion handler is invoked. You determine the status of the authorization attempt by checking the value of the [`contentAuthorizationRequestStatus`](/documentation/AVFoundation/AVPlayerItem/contentAuthorizationRequestStatus) property.

Even if the status indicates a completed authorization, the content may still not be authorized (for example, if the user authorizes an Apple ID other than that associated with the content).  You should re-check the value of [`contentAuthorizationRequestStatus`](/documentation/AVFoundation/AVPlayerItem/contentAuthorizationRequestStatus) to verify whether the content has actually been authorized before continuing.  It is not necessary to call this method if the value of [`contentAuthorizationRequestStatus`](/documentation/AVFoundation/AVPlayerItem/contentAuthorizationRequestStatus) is already true.

---

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)