"use strict";(self.webpackChunkspotify_api_docs=self.webpackChunkspotify_api_docs||[]).push([[1889],{3905:function(e,t,n){n.d(t,{Zo:function(){returnu},kt:function(){returnf}});varr=n(7294);functioni(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}functiono(e){for(vart=1;t<arguments.length;t++){varn=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){i(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,i=function(e,t){if(null==e)return{};varn,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);returni}(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)&&(i[n]=e[n])}returni}varl=r.createContext({}),s=function(e){vart=r.useContext(l),n=t;returne&&(n="function"==typeofe?e(t):o(o({},t),e)),n},u=function(e){vart=s(e.components);returnr.createElement(l.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){vart=e.children;returnr.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){varn=e.components,i=e.mdxType,a=e.originalType,l=e.parentName,u=c(e,["components","mdxType","originalType","parentName"]),d=s(n),f=i,m=d["".concat(l,".").concat(f)]||d[f]||p[f]||a;returnn?r.createElement(m,o(o({ref:t},u),{},{components:n})):r.createElement(m,o({ref:t},u))}));functionf(e,t){varn=arguments,i=t&&t.mdxType;if("string"==typeofe||i){vara=n.length,o=newArray(a);o[0]=d;varc={};for(varlint)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeofe?e:i,o[1]=c;for(vars=2;s<a;s++)o[s]=n[s];returnr.createElement.apply(null,o)}returnr.createElement.apply(null,n)}d.displayName="MDXCreateElement"},5398:function(e,t,n){n.r(t),n.d(t,{assets:function(){returnu},contentTitle:function(){returnl},default:function(){returnf},frontMatter:function(){returnc},metadata:function(){returns},toc:function(){returnp}});varr=n(7462),i=n(3366),a=(n(7294),n(3905)),o=["components"],c={id:"client_credentials",title:"Client Credentials"},l=void0,s={unversionedId:"client_credentials",id:"client_credentials",title:"Client Credentials",description:"The Client Credentials flow is used in server-to-server authentication.",source:"@site/docs/client_credentials.md",sourceDirName:".",slug:"/client_credentials",permalink:"/SpotifyAPI-NET/docs/client_credentials",draft:!1,editUrl:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/edit/master/SpotifyAPI.Docs/docs/client_credentials.md",tags:[],version:"current",lastUpdatedBy:"Jonas Dellinger",lastUpdatedAt:1685219501,formattedLastUpdatedAt:"May 27, 2023",frontMatter:{id:"client_credentials",title:"Client Credentials"},sidebar:"docs",previous:{title:"Introduction",permalink:"/SpotifyAPI-NET/docs/auth_introduction"},next:{title:"Implicit Grant",permalink:"/SpotifyAPI-NET/docs/implicit_grant"}},u={},p=[{value:"Request token once",id:"request-token-once",level:2},{value:"Request Token On-Demand",id:"request-token-on-demand",level:2}],d={toc:p};functionf(e){vart=e.components,n=(0,i.Z)(e,o);return(0,a.kt)("wrapper",(0,r.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("blockquote",null,(0,a.kt)("p",{parentName:"blockquote"},"The Client Credentials flow is used in server-to-server authentication.\nOnly endpoints that do not access user information can be accessed.")),(0,a.kt)("p",null,"By supplying your ",(0,a.kt)("inlineCode",{parentName:"p"},"SPOTIFY_CLIENT_ID")," and ",(0,a.kt)("inlineCode",{parentName:"p"},"SPOTIFY_CLIENT_SECRET"),", you get an access token."),(0,a.kt)("h2",{id:"r