"use strict";(self.webpackChunkspotify_api_docs=self.webpackChunkspotify_api_docs||[]).push([[2096],{3905:function(e,t,n){n.d(t,{Zo:function(){returnp},kt:function(){returnh}});varr=n(7294);functiono(e,t,n){returntine?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}functiona(e,t){varn=Object.keys(e);if(Object.getOwnPropertySymbols){varr=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){returnObject.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}returnn}functioni(e){for(vart=1;t<arguments.length;t++){varn=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}returne}functionc(e,t){if(null==e)return{};varn,r,o=function(e,t){if(null==e)return{};varn,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);returno}(e,t);if(Object.getOwnPropertySymbols){vara=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}returno}vars=r.createContext({}),u=function(e){vart=r.useContext(s),n=t;returne&&(n="function"==typeofe?e(t):i(i({},t),e)),n},p=function(e){vart=u(e.components);returnr.createElement(s.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){vart=e.children;returnr.createElement(r.Fragment,{},t)}},l=r.forwardRef((function(e,t){varn=e.components,o=e.mdxType,a=e.originalType,s=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),l=u(n),h=o,f=l["".concat(s,".").concat(h)]||l[h]||d[h]||a;returnn?r.createElement(f,i(i({ref:t},p),{},{components:n})):r.createElement(f,i({ref:t},p))}));functionh(e,t){varn=arguments,o=t&&t.mdxType;if("string"==typeofe||o){vara=n.length,i=newArray(a);i[0]=l;varc={};for(varsint)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c.mdxType="string"==typeofe?e:o,i[1]=c;for(varu=2;u<a;u++)i[u]=n[u];returnr.createElement.apply(null,i)}returnr.createElement.apply(null,n)}l.displayName="MDXCreateElement"},3873:function(e,t,n){n.r(t),n.d(t,{assets:function(){returnp},contentTitle:function(){returns},default:function(){returnh},frontMatter:function(){returnc},metadata:function(){returnu},toc:function(){returnd}});varr=n(7462),o=n(3366),a=(n(7294),n(3905)),i=["components"],c={id:"authorization_code",title:"Authorization Code"},s=void0,u={unversionedId:"auth/authorization_code",id:"version-5.1.1/auth/authorization_code",title:"Authorization Code",description:"This way is not recommended for client-side apps and requires server-side code to run securely.",source:"@site/versioned_docs/version-5.1.1/auth/authorization_code.md",sourceDirName:"auth",slug:"/auth/authorization_code",permalink:"/SpotifyAPI-NET/docs/5.1.1/auth/authorization_code",draft:!1,editUrl:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/edit/master/SpotifyAPI.Docs/versioned_docs/version-5.1.1/auth/authorization_code.md",tags:[],version:"5.1.1",lastUpdatedBy:"Jonas Dellinger",lastUpdatedAt:1685219501,formattedLastUpdatedAt:"May 27, 2023",frontMatter:{id:"authorization_code",title:"Authorization Code"},sidebar:"version-5.1.1/someSidebar",previous:{title:"Implicit Grant",permalink:"/SpotifyAPI-NET/docs/5.1.1/auth/implicit_grant"},next:{title:"Client Credentials",permalink:"/SpotifyAPI-NET/docs/5.1.1/auth/client_credentials"}},p={},d=[{value:"Token Refresh",id:"token-refresh",level:2}],l={toc:d};functionh(e){vart=e.components,n=(0,o.Z)(e,i);return(0,a.kt)("wrapper",(0,r.Z)({},l,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"This way is ",(0,a.kt)("strong",{parentName:"p"},"not recommended"),"forclient-sideappsandrequiresserver-sidecodetorunsecurely.\nWiththisapproach,youfirstgetacodewhichyouneedtotradeagainsttheaccess-token.\nInthisexchangeyouneedtoprovideyourClient-Secretandbecauseofthatit'snotrecom