EC.Spotify
1.1.1
dotnet add package EC.Spotify --version 1.1.1
NuGet\Install-Package EC.Spotify -Version 1.1.1
<PackageReference Include="EC.Spotify" Version="1.1.1" />
<PackageVersion Include="EC.Spotify" Version="1.1.1" />
<PackageReference Include="EC.Spotify" />
paket add EC.Spotify --version 1.1.1
#r "nuget: EC.Spotify, 1.1.1"
#:package EC.Spotify@1.1.1
#addin nuget:?package=EC.Spotify&version=1.1.1
#tool nuget:?package=EC.Spotify&version=1.1.1
EC.Spotify
A comprehensive .NET client library for the Spotify Web API, providing strongly-typed access to albums, artists, tracks, playlists, playback control, library management, and more.
Full documentation is available in the Wiki.
Latest News - 2026.04.25
Version 1.1.1 - Deployment
Had to rework IPlaylist and had some bad test track data causing testing errors. Had some stuff come up so i am a week behind on my deployment. If you have any feedback or issues, please let me know. Thanks for using EC.Spotify!
Installation
Package Manager Console
Install-Package EC.Spotify
.NET CLI
dotnet add package EC.Spotify
Configuration
Register EC.Spotify in your IServiceCollection using either a configuration delegate or an IConfiguration section. See the Getting Started wiki page for full setup instructions.
builder.Services.AddSpotify(options =>
{
options.ClientId = "your-client-id";
options.ClientSecret = "your-client-secret";
options.RedirectUri = "https://localhost:5001/callback";
options.Scopes = ["user-read-playback-state", "user-library-read"];
});
ISpotifyClient
Inject ISpotifyClient to access all services:
| Property | Service | Wiki |
|---|---|---|
Albums |
IAlbumService |
Albums |
Artists |
IArtistService |
Artists |
Audiobooks |
IAudiobookService |
Audiobooks |
Authorization |
IAuthorizationService |
Authorization |
Chapters |
IChapterService |
Chapters |
Episodes |
IEpisodeService |
Episodes |
Library |
ILibraryService |
Library |
Player |
IPlayerService |
Player |
Playlists |
IPlaylistService |
Playlists |
Search |
ISearchService |
Search |
Shows |
IShowService |
Shows |
Tracks |
ITrackService |
Tracks |
User |
IUserService |
User |
Error Handling
All service methods return SpotifyResult<T>:
IsSuccess—truewhen the request succeededData— the result data (populated on success)Error— aSpotifyErrorwithStatus,Message, andReason(populated on failure)
var result = await _spotifyClient.Albums.AlbumGetAsync(albumId);
if (result.IsSuccess)
Console.WriteLine(result.Data.Name);
else
Console.WriteLine($"{result.Error?.Status}: {result.Error?.Message}");
Requirements
- .NET 10
- Valid Spotify Developer credentials (Get them here)
- Valid Spotify Premium account for playback control features
License
This project is licensed under the MIT License. See the LICENSE file for details.
Contributing
Bring issues to the table, or suggest features! Contributions are welcome and appreciated.
Support
For issues, questions, or contributions, please visit the GitHub repository.
Acknowledgments
Built for people who enjoy their Spotify Premium account and want to interact with its API features. Great appreciation for the Spotify development team!
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.Extensions.Caching.Memory (>= 10.0.3)
- Microsoft.Extensions.Http (>= 10.0.3)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.