---
title: MusicTokenRequestError.permissionDenied
framework: musickit
role: symbol
role_heading: Case
path: musickit/musictokenrequesterror/permissiondenied
---

# MusicTokenRequestError.permissionDenied

An error that occurs when the user doesn’t consent for the current app to access their Apple Music data.

## Declaration

```swift
case permissionDenied
```

## Discussion

Discussion Apps using MusicKit need to request prior informed consent from the user to access their Apple Music data by calling request() at the appropriate point in the app flow, right before needing to use other APIs from MusicKit.
