---
title: fetchWebAuthTokenCompletionBlock
framework: cloudkit
role: symbol
role_heading: Instance Property
path: cloudkit/ckfetchwebauthtokenoperation/fetchwebauthtokencompletionblock
---

# fetchWebAuthTokenCompletionBlock

The block to execute when the operation finishes.

## Declaration

```swift
var fetchWebAuthTokenCompletionBlock: ((String?, (any Error)?) -> Void)? { get set }
```

## Discussion

Discussion The closure returns no value and takes the following parameters: If the operation is successful, the web authentication token; otherwise, nil. An error that contains information about a problem, or nil if the system successfully fetches the token. The operation executes this closure only once. You must provide a closure capable of executing on a background thread, so any tasks that require access to the main thread must dispatch accordingly.

## See Also

### Managing the Operation’s Configuration

- [apiToken](cloudkit/ckfetchwebauthtokenoperation/apitoken.md)
