<titledata-react-helmet="true">SpotifyAPI-NET | SpotifyAPI-NET</title><metadata-react-helmet="true"property="og:title"content="SpotifyAPI-NET | SpotifyAPI-NET"><metadata-react-helmet="true"name="description"content="Documentation for the C# .NET SpotifyAPI-NET Library"><metadata-react-helmet="true"property="og:description"content="Documentation for the C# .NET SpotifyAPI-NET Library"><metadata-react-helmet="true"name="twitter:card"content="summary_large_image"><linkdata-react-helmet="true"rel="shortcut icon"href="/img/favicon.ico"><linkrel="stylesheet"href="/styles.8a053330.css">
<navclass="navbar navbar--light navbar--fixed-top"><divclass="navbar__inner"><divclass="navbar__items"><divaria-label="Navigation bar toggle"class="navbar__toggle"role="button"tabindex="0"><svgxmlns="http://www.w3.org/2000/svg"width="30"height="30"viewBox="0 0 30 30"role="img"focusable="false"><title>Menu</title><pathstroke="currentColor"stroke-linecap="round"stroke-miterlimit="10"stroke-width="2"d="M4 7h22M4 15h22M4 23h22"></path></svg></div><aclass="navbar__brand"href="/"><imgclass="navbar__logo"src="/img/logo.svg"alt="SpotifyAPI-NET"><strongclass="navbar__title">SpotifyAPI-NET</strong></a><divclass="navbar__item dropdown dropdown--hoverable dropdown--left"><aactiveclassname="navbar__link--active"class="navbar__item navbar__link">Docs</a><ulclass="dropdown__menu"><li><aclass="dropdown__link"href="/docs/next/introduction">Latest/Next</a></li><li><aclass="dropdown__link"href="/docs/home">5.1.1</a></li></ul></div><aclass="navbar__item navbar__link"href="/news">News</a></div><divclass="navbar__items navbar__items--right"><ahref="https://github.com/JohnnyCrazy/SpotifyAPI-NET"target="_blank"rel="noopener noreferrer"class="navbar__item navbar__link">GitHub</a><divclass="react-toggle react-toggle--disabled displayOnlyInLargeViewport_1gtM"><divclass="react-toggle-track"><divclass="react-toggle-track-check"><spanclass="toggle_keGJ moon_1gwN"></span></div><divclass="react-toggle-track-x"><spanclass="toggle_keGJ sun_3CPA"></span></div></div><divclass="react-toggle-thumb"></div><inputtype="checkbox"disabled=""aria-label="Dark mode toggle"class="react-toggle-screenreader-only"></div></div></div><divrole="presentation"class="navbar-sidebar__backdrop"></div><divclass="navbar-sidebar"><divclass="navbar-sidebar__brand"><aclass="navbar__brand"href="/"><imgclass="navbar__logo"src="/img/logo.svg"alt="SpotifyAPI-NET"><strongclass="navbar__title">SpotifyAPI-NET</strong></a></div><divclass="navbar-sidebar__items"><divclass="menu"><ulclass="menu__list"><liclass="menu__list-item"><aactiveclassname="navbar__link--active"class="menu__link menu__link--sublist">Docs</a><ulclass="menu__list"><liclass="menu__list-item"><aclass="menu__link"href="/docs/next/introduction">Latest/Next</a></li><liclass="menu__list-item"><aclass="menu__link"href="/docs/home">5.1.1</a></li></ul></li><liclass="menu__list-item"><aclass="menu__link"href="/news">News</a></li><liclass="menu__list-item"><ahref="https://github.com/JohnnyCrazy/SpotifyAPI-NET"target="_blank"rel="noopener noreferrer"class="menu__link">GitHub</a></li></ul></div></div></div></nav><divclass="main-wrapper"><headerclass="hero hero--primary heroBanner_2Ftp"><divclass="container"><divclass="row"><divclass="col col--5"><imgsrc="img/logo.svg"width="120"height="120"><h1class="hero__title">SpotifyAPI-NET<spanstyle="margin-left:50px"></span><span><ahref="https://github.com/JohnnyCrazy/SpotifyAPI-NET"data-icon="octicon-star"data-size="large"data-show-count="true"aria-label="Star JohnnyCrazy/SpotifyAPI-NET on GitHub">Star</a></span><br><ahref="https://www.nuget.org/packages/SpotifyAPI.Web/"rel="noopener noreferrer"><imgalt="Nuget"src="https://img.shields.io/nuget/v/SpotifyAPI.Web?label=SpotifyAPI.Web&style=flat-square"></a><ahref="https://www.nuget.org/packages/SpotifyAPI.Web.Auth/"rel="noopener noreferrer"><imgalt="Nuget"src="https://img.shields.io/nuget/v/SpotifyAPI.Web.Auth?label=SpotifyAPI.Web.Auth&style=flat-square"></a></h1><pclass="hero__subtitle">🔊 A Client for the Spotify Web API, written in C#/.NET</p><divclass="buttons_1Wc3"><aclass="button button--outline button--secondary button--lg"href="/docs/next/introduction">Get Started</a></div></div><divclass="col col--7 exampleCode_3Dzy"><divclass="codeBlockContent_32p_"><buttontype="button"aria-label="Copy code to clipboard"class="copyButton_1BYj">Copy</button><divtabindex="0"class="prism-code language-csharp codeBlock_19pQ"><divclass="codeBlockLines_2n9r"style="color:#bfc7d5;background-color:#292d3e"><divclass="token-line"style
</span></div><divclass="token-line"style="color:#bfc7d5"><spanclass="token plain">var me = await spotify.UserProfile.Current();</span></div><divclass="token-line"style="color:#bfc7d5"><spanclass="token plain">Console.WriteLine($"Hello there {me.DisplayName}");</span></div><divclass="token-line"style="color:#bfc7d5"><spanclass="token plain"style="display:inline-block">
</span></div><divclass="token-line"style="color:#bfc7d5"><spanclass="token plain">await foreach(</span></div><divclass="token-line"style="color:#bfc7d5"><spanclass="token plain"> var playlist in spotify.Paginate(spotify.Playlists.CurrentUsers())</span></div><divclass="token-line"style="color:#bfc7d5"><spanclass="token plain">)</span></div><divclass="token-line"style="color:#bfc7d5"><spanclass="token plain">{</span></div><divclass="token-line"style="color:#bfc7d5"><spanclass="token plain"> Console.WriteLine(playlist.Name);</span></div><divclass="token-line"style="color:#bfc7d5"><spanclass="token plain">}</span></div></div></div></div></div></div></div></header><main><divclass="container"><h2style="text-align:center;margin-top:30px">Try it out now</h2><divstyle="padding:30px"><div><ulrole="tablist"aria-orientation="horizontal"class="tabs"><lirole="tab"tabindex="0"aria-selected="true"class="tabs__item tabItem_3zTA tabs__item--active">.NET CLI</li><lirole="tab"tabindex="0"aria-selected="false"class="tabs__item tabItem_3zTA">Package Manager</li><lirole="tab"tabindex="0"aria-selected="false"class="tabs__item tabItem_3zTA">Package Reference</li></ul><divrole="tabpanel"class="margin-vert--md"><div><divclass="codeBlockContent_32p_"><buttontype="button"aria-label="Copy code to clipboard"class="copyButton_1BYj">Copy</button><divtabindex="0"class="prism-code language-shell codeBlock_19pQ"><divclass="codeBlockLines_2n9r"style="color:#bfc7d5;background-color:#292d3e"><divclass="token-line"style="color:#bfc7d5"><spanclass="token plain">dotnet </span><spanclass="token function"style="color:rgb(130, 170, 255)">add</span><spanclass="token plain"> package SpotifyAPI.Web --version </span><spanclass="token number"style="color:rgb(247, 140, 108)">6.0</span><spanclass="token plain">.0-beta.1</span></div><divclass="token-line"style="color:#bfc7d5"><spanclass="token plain"></span><spanclass="token comment"style="color:rgb(105, 112, 152);font-style:italic"># Optional Auth module, which includes an embedded HTTP Server for OAuth2</span><spanclass="token plain"></span></div><divclass="token-line"style="color:#bfc7d5"><spanclass="token plain">dotnet </span><spanclass="token function"style="color:rgb(130, 170, 255)">add</span><spanclass="token plain"> package SpotifyAPI.Web.Auth --version </span><spanclass="token number"style="color:rgb(247, 140, 108)">6.0</span><spanclass="token plain">.0-beta.1</span></div></div></div></div></div></div></div></div></div><sectionclass="features_P2SU"><divclass="container"><divclass="row"><divclass="col col--4"><divclass="text--center"><imgclass="featureImage_3Xqx"src="/img/undraw_preferences_uuo2.svg"alt="[object Object]"></div><h3>Sane Defaults - Easy To Configure</h3><p><code>SpotifyAPI-NET</code> allows you to quickly integrate with Spotify's Web API by supplying sane configuration defaults from the start. Later on, behaviour can be customized using extensive configuration possibilities.</p></div><divclass="col col--4"><divclass="text--center"><imgclass="featureImage_3Xqx"src="/img/undraw_project_completed_w0oq.svg"alt="[object Object]"></div><h3>All API Calls Integrated</h3><p>The Spotify Web API consists of over 74 API calls. <code>SpotifyAPI-NET</code> provides fully typed requests/responses for all of them.</p></div><divclass="col col--4"><divclass="text--center"><imgclass="featureImage_3Xqx"src="/img/undraw_Devices_e67q.svg"alt="[object Object]"></div><h3>.NET Standard 2.X</h3><p>With the support of .NET Standard 2.X, <code>SpotifyAPI-NET</code> runs on many platforms, including .NET Core, UWP and Xamarin.Forms (Windows, Android, iOS and Mac)</p></div><divclass="col col--4"><divclass="text--center"><imgclass="featureImage_3Xqx"src="/img/undraw_QA_engineers_dg5p.svg"alt="[object Object]"></div><h3>Testable</h3><p><code>SpotifyAPI-NET</code> is built on a modular structure, which allows easy testing through mocks and stubs. Learn more by visiting the <ahref="/docs/next/testing">Testing Guide</a></p></div></div