<divid="docusaurus-base-url-issue-banner-container"></div><div><ahref="#"class="skipToContent_1oUP">Skip to main content</a></div><navclass="navbar navbar--fixed-top"><divclass="navbar__inner"><divclass="navbar__items"><buttonaria-label="Navigation bar toggle"class="navbar__toggle clean-btn"type="button"tabindex="0"><svgwidth="30"height="30"viewBox="0 0 30 30"aria-hidden="true"><pathstroke="currentColor"stroke-linecap="round"stroke-miterlimit="10"stroke-width="2"d="M4 7h22M4 15h22M4 23h22"></path></svg></button><aclass="navbar__brand"href="/SpotifyAPI-NET/"><imgsrc="/SpotifyAPI-NET/img/logo.svg"alt="SpotifyAPI-NET"class="themedImage_1VuW themedImage--light_3UqQ navbar__logo"><imgsrc="/SpotifyAPI-NET/img/logo.svg"alt="SpotifyAPI-NET"class="themedImage_1VuW themedImage--dark_hz6m navbar__logo"><bclass="navbar__title">SpotifyAPI-NET</b></a><divclass="navbar__item dropdown dropdown--hoverable"><aclass="navbar__item navbar__link">Docs</a><ulclass="dropdown__menu"><li><aclass="dropdown__link"href="/SpotifyAPI-NET/docs/introduction">6.X (current)</a></li><li><aclass="dropdown__link"href="/SpotifyAPI-NET/docs/5.1.1/home">5.1.1</a></li></ul></div></div><divclass="navbar__items navbar__items--right"><ahref="https://github.com/JohnnyCrazy/SpotifyAPI-NET"target="_blank"rel="noopener noreferrer"class="navbar__item navbar__link"><span>GitHub<svgwidth="13.5"height="13.5"aria-hidden="true"viewBox="0 0 24 24"class="iconExternalLink_3J9K"><pathfill="currentColor"d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></span></a><divclass="react-toggle toggle_3Zt9 react-toggle--disabled"><divclass="react-toggle-track"role="button"tabindex="-1"><divclass="react-toggle-track-check"><spanclass="toggle_71bT">🌜</span></div><divclass="react-toggle-track-x"><spanclass="toggle_71bT">🌞</span></div><divclass="react-toggle-thumb"></div></div><inputtype="checkbox"class="react-toggle-screenreader-only"aria-label="Switch between dark and light mode"></div></div></div><divrole="presentation"class="navbar-sidebar__backdrop"></div></nav><divclass="main-wrapper"><headerclass="hero hero--primary heroBanner_3P7f"><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/vpre/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/vpre/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_1r9m"><aclass="button button--outline button--secondary button--lg"href="/SpotifyAPI-NET/docs/introduction">Get Started</a></div></div><divclass="col col--7 exampleCode_PXaa"><divclass="codeBlockContainer_K1bP"><divclass="codeBlockContent_hGly csharp"><pretabindex="0"class="prism-code language-csharp codeBlock_23N8 thin-scrollbar"style="color:#bfc7d5;background-color:#292d3e"><codeclass="codeBlockLines_39YC"><spanclass="token-line"style="color:#bfc7d5"><spanclass="token plain">var spotify = new SpotifyClient("YourAccessToken");</span></span><spanclass="token-line"style="color:#bfc7d5"><spanclass="token plain"style="display:inline-block">
</span></span><spanclass="token-line"style="color:#bfc7d5"><spanclass="token plain">var me = await spotify.UserProfile.Current();</span></span><spanclass="token-line"style="color:#bfc7d5"><spanclass="token plain">Console.WriteLine($"Hello there {me.DisplayName}");</span></span><spanclass="token-line"style="color:#bfc7d5"><spanclass="token plain"style="display:inline-block">
</span></span><spanclass="token-line"style="color:#bfc7d5"><spanclass="token plain">await foreach(</span></span><spanclass="token-line"style="color:#bfc7d5"><spanclass="token plain"> var playlist in spotify.Paginate(await spotify.Playlists.CurrentUsers())</span></span><spanclass="token-line"style="color:#bfc7d5"><spanclass="token plain">)</span></span><spanclass="token-line"style="color:#bfc7d5"><spanclass="token plain">{</span></span><spanclass="token-line"style="color:#bfc7d5"><spanclass="token plain"> Console.WriteLine(playlist.Name);</span></span><spanclass="token-line"style="color:#bfc7d5"><spanclass="token plain">}</span></span></code></pre><buttontype="button"aria-label="Copy code to clipboard"class="copyButton_Ue-o clean-btn">Copy</button></div></div></div></div></div></header><main><divclass="container"><h2style="text-align:center;margin-top:30px">Try it out now</h2><divstyle="padding:10px"><divclass="tabs-container"><ulrole="tablist"aria-orientation="horizontal"class="tabs"><lirole="tab"tabindex="0"aria-selected="true"class="tabs__item tabItem_1uMI tabs__item--active">.NET CLI</li><lirole="tab"tabindex="-1"aria-selected="false"class="tabs__item tabItem_1uMI">Package Manager</li><lirole="tab"tabindex="-1"aria-selected="false"class="tabs__item tabItem_1uMI">Package Reference</li></ul><divclass="margin-vert--md"><divrole="tabpanel"><divclass="codeBlockContainer_K1bP"><divclass="codeBlockContent_hGly shell"><pretabindex="0"class="prism-code language-shell codeBlock_23N8 thin-scrollbar"style="color:#bfc7d5;background-color:#292d3e"><codeclass="codeBlockLines_39YC"><spanclass="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</span></span><spanclass="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></span><spanclass="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</span></span></code></pre><buttontype="button"aria-label="Copy code to clipboard"class="copyButton_Ue-o clean-btn">Copy</button></div></div></div><divrole="tabpanel"hidden=""><divclass="codeBlockContainer_K1bP"><divclass="codeBlockContent_hGly shell"><pretabindex="0"class="prism-code language-shell codeBlock_23N8 thin-scrollbar"style="color:#bfc7d5;background-color:#292d3e"><codeclass="codeBlockLines_39YC"><spanclass="token-line"style="color:#bfc7d5"><spanclass="token plain">Install-Package SpotifyAPI.Web</span></span><spanclass="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></span><spanclass="token-line"style="color:#bfc7d5"><spanclass="token plain">Install-Package SpotifyAPI.Web.Auth</span></span></code></pre><buttontype="button"aria-label="Copy code to clipboard"class="copyButton_Ue-o clean-btn">Copy</button></div></div></div><divrole="tabpanel"hidden=""><divclass="codeBlockContainer_K1bP"><divclass="codeBlockContent_hGly xml"><pretabindex="0"class="prism-code language-xml codeBlock_23N8 thin-scrollbar"style="color:#bfc7d5;background-color:#292d3e"><codeclass="codeBlockLines_39YC"><spanclass="token-line"style="color:#bfc7d5"><spanclass="token tag punctuation"style="color:rgb(199, 146, 234)"><</span><spanclass="token tag"style="color:rgb(255, 85, 114)">PackageReference</span><spanclass="token tag"style="color:rgb(255, 85, 114)"></span><spanclass="token tag attr-name"style="color:rgb(255, 203, 107)">Include</span><spanclass="tokentagattr-valuepunctu