Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Create Apple Music Playlist
// initialize axios instance
let apple = axios.create({
baseURL: 'https://api.music.apple.com/v1',
headers: {
'Authorization': `Bearer ${developerToken}`,
'Music-User-Token': `${musicUserToken}`
}
})
// create playlist
apple.post('/me/library/playlists', {
attributes: {
name: "Chris Cornell at City Park on Oct 28, 2011"
},
relationships: {
tracks: {
data: ids
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.