"use strict";(self.webpackChunkspotify_api_docs=self.webpackChunkspotify_api_docs||[]).push([[1889],{3905:function(e,t,n){n.d(t,{Zo:function(){returnp},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}vars=r.createContext({}),l=function(e){vart=r.useContext(s),n=t;returne&&(n="function"==typeofe?e(t):o(o({},t),e)),n},p=function(e){vart=l(e.components);returnr.createElement(s.Provider,{value:t},e.children)},u={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,s=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),d=l(n),f=i,m=d["".concat(s,".").concat(f)]||d[f]||u[f]||a;returnn?r.createElement(m,o(o({ref:t},p),{},{components:n})):r.createElement(m,o({ref:t},p))}));functionf(e,t){varn=arguments,i=t&&t.mdxType;if("string"==typeofe||i){vara=n.length,o=newArray(a);o[0]=d;varc={};for(varsint)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c.mdxType="string"==typeofe?e:i,o[1]=c;for(varl=2;l<a;l++)o[l]=n[l];returnr.createElement.apply(null,o)}returnr.createElement.apply(null,n)}d.displayName="MDXCreateElement"},6963:function(e,t,n){n.r(t),n.d(t,{frontMatter:function(){returno},contentTitle:function(){returnc},metadata:function(){returns},toc:function(){returnl},default:function(){returnu}});varr=n(3117),i=n(102),a=(n(7294),n(3905)),o={id:"client_credentials",title:"Client Credentials"},c=void0,s={unversionedId:"client_credentials",id:"client_credentials",isDocsHomePage:!1,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",editUrl:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/edit/master/SpotifyAPI.Docs/docs/client_credentials.md",version:"current",lastUpdatedBy:"dependabot[bot]",lastUpdatedAt:1636566952,formattedLastUpdatedAt:"11/10/2021",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"}},l=[{value:"Request token once",id:"request-token-once",children:[]},{value:"Request Token On-Demand",id:"request-token-on-demand",children:[]}],p={toc:l};functionu(e){vart=e.components,n=(0,i.Z)(e,["components"]);return(0,a.kt)("wrapper",(0,r.Z)({},p,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:"request-token-once"},"Requestto