AppleMusicAPI.NET is a .NET wrapper for Apple Music Api. The API provides clients with the ability to interact with Apple music resources and, provided you are able to generate a user token, modify a users library. User tokens can be generated in native Apple applications and also using MusicKitJS which, at the time of writing, is currently in beta.