I am trying to display albums, playlists and artist for a Genre.
Does anyone know how to do this or if this is not currently supported by the MusicKit and Apple Music API?
Post not yet marked as solved
So I am trying to access my Heavy Rotation content using this command from the Apple Music API website:
wget https://api.music.apple.com/v1/me/history/heavy-rotation
I made sure to change "me" to my username on Apple Music and I ran this command from my Terminal. It is connecting to the Apple Music API but it is saying that the request is unauthorized. I was surprised by this because I have already granted access on my device after requestAuthorization ran once (after authorization it does not ask again). So why is it saying that the request is unauthorized? Do I need to use my developer token somewhere? Thanks.
(base) MacBook-Pro-210:soundtrack nalinkrishnan$ wget https://api.music.apple.com/v1/theonlynalin/history/heavy-rotation
--2022-05-02 12:04:18-- https://api.music.apple.com/v1/theonlynalin/history/heavy-rotation
Resolving api.music.apple.com (api.music.apple.com)... 2001:559:19:608b::2a1, 2001:559:19:6099::2a1, 2001:559:19:6080::2a1, ...
Connecting to api.music.apple.com (api.music.apple.com)|2001:559:19:608b::2a1|:443... connected.
HTTP request sent, awaiting response... 401 Unauthorized
Username/Password Authentication Failed.
Hey everyone,
I am creating playlist via the MusicKit API and by default it creates the playlist in the users library and the isPublic attribute is set to false.
Is there a way to make the playlist public at the time of creation?
(Only way to change isPublic = true at this time seems to be through the Music app right now)
Hello,
I am trying to get recommendations based on the identifier of multiple tracks. But I am unable to get any results
Here is the code I have used to try to get recommendations based on one album
let dataRequest = MusicDataRequest(urlRequest: URLRequest(url: URL(string: "https://api.music.apple.com/v1/me/recommendations/1571344275")!))
let dataResponse = try await dataRequest.response()
For this I am getting the response:
Failed to perform MusicDataRequest.Context(
url: https://api.music.apple.com/v1/me/recommendations/1571344275,
currentRetryCounts: [.other: 1]
) with MusicDataRequest.Error(
status: 404,
code: 40400,
title: "Resource Not Found",
detailText: "Resource with requested id was not found",
I have tried used the identifier of songs/albums, to no success. What am I doing wrong?
Hello,
I am wondering how one can play music videos (with the actual video playing) with the ApplicationMusicPlayer using MusicKit for Swift?
There is not much documentation on this, so any help would be appreciated.
Hello,
Is there any way to get content like what is displayed in the Browse tab of Apple Music using MusicKit or Apple Music API?
I checked the contents of the default recommendations in the Apple Music API, and these were my personal recommendations.
Is it possible to get common recommendations?
Hello,
I am fetching and displaying the .fullalbums for an Artist through the MusicKit api.
The JSON response returned has a hasNextBatch: true value, but I am unsure how to fetch and display the next batch.
Is this something that can be intelligently retrieved though some MusicKit functionality or does one have to perform another data request to fetch the next batch?
Post not yet marked as solved
Is it possible to get an album from a song in MusicKit? I haven't been able to find a way to do so currently. I have tried using .with() but it appears that album is not supported.
What I am looking for is properties on the Song like what is present on MPMediaItem such as albumTitle, genre, etc.