One Logo Pool Ball
MusicKit · IOS API REFERENCE

MusicUserTokenProvider

class · iOS 15.0+ · SDK 27.1

class MusicUserTokenProvider

A class that music requests use to fetch user tokens your app requires to access Apple Music API.

Members (2)

method · iOS 15.0+

userToken

TypeScript
userToken(developerToken: string, options: MusicTokenRequestOptions): Promise<string>
Swift declaration
func userToken(for developerToken: String, options: MusicTokenRequestOptions) async throws -> String

Fetches and returns a user token for Apple Music API.

init · iOS 15.0+

init

TypeScript
static init(): MusicUserTokenProvider
Swift declaration
init()

Creates a user token provider.

Skipped declarations

No declarations were skipped in this snapshot.

All MusicKit types →