---
title: "requestConfirmation(conditions:actionName:dialog:showDialogAsPrompt:content:)"
framework: appintents
role: symbol
role_heading: Instance Method
path: "appintents/appintent/requestconfirmation(conditions:actionname:dialog:showdialogasprompt:content:)"
---

# requestConfirmation(conditions:actionName:dialog:showDialogAsPrompt:content:)

Displays a confirmation prompt with an interactive snippet.

## Declaration

```swift
func requestConfirmation<Content>(conditions: ConfirmationConditions = [], actionName: ConfirmationActionName = .`continue`, dialog: IntentDialog? = nil, showDialogAsPrompt: Bool = true, @ViewBuilder content: () -> Content) async throws where Content : View
```

## Parameters

- `conditions`: The conditions to check before asking for confirmation.
- `actionName`: The name to use in the button that confirms the action.
- `dialog`: The localized text you want the confirmation request to display or speak.
- `showDialogAsPrompt`: true to include the contents of the dialog parameter in the confirmation interface. Specify false to omit the dialog from the interface.
- `content`: The SwiftUI view to display in the confirmation interface.

## Discussion

Discussion Call this method when you want someone to confirm a particular choice. For example, call this method before someone performs an action that might be destructive or unsafe. The method displays a prompt with the provided snippet, and asks the person to confirm or cancel the operation. The method returns normally if the person confirms the operation, but throws an error if they cancel it.

## See Also

### Requesting confirmation

- [requestConfirmation()](appintents/appintent/requestconfirmation().md)
- [requestConfirmation(conditions:actionName:dialog:)](appintents/appintent/requestconfirmation(conditions:actionname:dialog:).md)
- [requestConfirmation(conditions:actionName:dialog:showDialogAsPrompt:snippetIntent:)](appintents/appintent/requestconfirmation(conditions:actionname:dialog:showdialogasprompt:snippetintent:)-3vewj.md)
- [requestConfirmation(conditions:actionName:dialog:showDialogAsPrompt:snippetIntent:)](appintents/appintent/requestconfirmation(conditions:actionname:dialog:showdialogasprompt:snippetintent:)-jxb8.md)
