---
title: createAccessToken()
framework: browserenginekit
role: symbol
role_heading: Type Method
path: browserenginekit/bedownloadmonitor-9bwls/createaccesstoken()
---

# createAccessToken()

Generates an opaque token that the system uses to keep your networking extension active in the background.

## Declaration

```swift
@objc(createAccessToken) static func createAccessToken() -> Data?
```

## Discussion

Discussion Use this method to generate a token that you pass to init(sourceURL:destinationURL:observedProgress:liveActivityAccessToken:).

## See Also

### Creating a download monitor

- [init(sourceURL:destinationURL:observedProgress:liveActivityAccessToken:)](browserenginekit/bedownloadmonitor-9bwls/init(sourceurl:destinationurl:observedprogress:liveactivityaccesstoken:).md)
