Spotify.NET/assets/js/2851a227.f8d6c900.js
2022-08-16 16:30:07 +00:00

1 line
5.4 KiB
JavaScript

"use strict";(self.webpackChunkspotify_api_docs=self.webpackChunkspotify_api_docs||[]).push([[2996],{3905:function(e,t,n){n.d(t,{Zo:function(){return s},kt:function(){return f}});var o=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){r(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))}))}return e}function c(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},a=Object.keys(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var u=o.createContext({}),l=function(e){var t=o.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},s=function(e){var t=l(e.components);return o.createElement(u.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},d=o.forwardRef((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,u=e.parentName,s=c(e,["components","mdxType","originalType","parentName"]),d=l(n),f=r,m=d["".concat(u,".").concat(f)]||d[f]||p[f]||a;return n?o.createElement(m,i(i({ref:t},s),{},{components:n})):o.createElement(m,i({ref:t},s))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,i=new Array(a);i[0]=d;var c={};for(var u in t)hasOwnProperty.call(t,u)&&(c[u]=t[u]);c.originalType=e,c.mdxType="string"==typeof e?e:r,i[1]=c;for(var l=2;l<a;l++)i[l]=n[l];return o.createElement.apply(null,i)}return o.createElement.apply(null,n)}d.displayName="MDXCreateElement"},803:function(e,t,n){n.r(t),n.d(t,{assets:function(){return p},contentTitle:function(){return l},default:function(){return m},frontMatter:function(){return u},metadata:function(){return s},toc:function(){return d}});var o=n(7462),r=n(3366),a=(n(7294),n(3905)),i=n(4996),c=["components"],u={id:"auth_introduction",title:"Introduction"},l=void 0,s={unversionedId:"auth_introduction",id:"auth_introduction",title:"Introduction",description:"Spotify does not allow unauthorized access to the API. Thus, you need an access token to make requests. This access token can be gathered via multiple schemes, all following the OAuth2 spec. Since it's important to choose the correct scheme for your usecase, make sure you have a grasp of the following terminology/docs:",source:"@site/docs/auth_introduction.md",sourceDirName:".",slug:"/auth_introduction",permalink:"/SpotifyAPI-NET/docs/auth_introduction",draft:!1,editUrl:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/edit/master/SpotifyAPI.Docs/docs/auth_introduction.md",tags:[],version:"current",lastUpdatedBy:"dependabot[bot]",lastUpdatedAt:1660667321,formattedLastUpdatedAt:"8/16/2022",frontMatter:{id:"auth_introduction",title:"Introduction"},sidebar:"docs",previous:{title:"Unit Testing",permalink:"/SpotifyAPI-NET/docs/unit_testing"},next:{title:"Client Credentials",permalink:"/SpotifyAPI-NET/docs/client_credentials"}},p={},d=[],f={toc:d};function m(e){var t=e.components,n=(0,r.Z)(e,c);return(0,a.kt)("wrapper",(0,o.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Spotify does not allow unauthorized access to the API. Thus, you need an access token to make requests. This access token can be gathered via multiple schemes, all following the OAuth2 spec. Since it's important to choose the correct scheme for your usecase, make sure you have a grasp of the following terminology/docs:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"OAuth2"),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"https://developer.spotify.com/documentation/general/guides/authorization-guide/#authorization-code-flow"},"Spotify Authorization Flows"))),(0,a.kt)("p",null,"Since every auth flow also needs an application in the ",(0,a.kt)("a",{parentName:"p",href:"https://developer.spotify.com/dashboard/"},"Spotify dashboard"),", make sure you have the necessary values (like ",(0,a.kt)("inlineCode",{parentName:"p"},"Client Id")," and ",(0,a.kt)("inlineCode",{parentName:"p"},"Client Secret"),")."),(0,a.kt)("p",null,"Then, continue with the docs of the specific auth flows:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/SpotifyAPI-NET/docs/client_credentials"},"Client Credentials")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/SpotifyAPI-NET/docs/implicit_grant"},"Implicit Grant")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/SpotifyAPI-NET/docs/authorization_code"},"Authorization Code")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/SpotifyAPI-NET/docs/pkce"},"PKCE")),(0,a.kt)("li",{parentName:"ul"},(0,a.kt)("a",{parentName:"li",href:"/SpotifyAPI-NET/docs/token_swap"},"(Token Swap)"))),(0,a.kt)("img",{alt:"auth comparison",src:(0,i.Z)("img/auth_comparison.png")}))}m.isMDXComponent=!0}}]);