---
title: "developerToken(options:)"
framework: musickit
role: symbol
role_heading: Instance Method
path: "musickit/musicdevelopertokenprovider/developertoken(options:)"
---

# developerToken(options:)

Fetches and returns a developer token for Apple Music API.

## Declaration

```swift
func developerToken(options: MusicTokenRequestOptions) async throws -> String
```

## Discussion

Discussion If you opt to create a custom implementation of the MusicDeveloperTokenProvider protocol, make sure to discard any cached developer token if the options parameter contains ignoreCache. You can add the newly generated token to an in-memory or persistent cache for faster access upon subsequent requests for this token.
