Spotify.NET/3c5916b7.7d02aa4f.js

1 line
6.5 KiB
JavaScript
Raw Normal View History

(window.webpackJsonp=window.webpackJsonp||[]).push([[21],{153:function(e,t,n){"use strict";n.r(t),n.d(t,"frontMatter",(function(){return o})),n.d(t,"metadata",(function(){return c})),n.d(t,"rightToc",(function(){return p})),n.d(t,"default",(function(){return b}));var r=n(2),a=n(9),i=(n(0),n(186)),o={id:"getting_started",title:"Getting Started"},c={id:"version-5.1.1/auth/getting_started",title:"Getting Started",description:"Auth-Methods",source:"@site/versioned_docs/version-5.1.1/auth/getting_started.md",permalink:"/SpotifyAPI-NET/docs/auth/getting_started",editUrl:"https://github.com/JohnnyCrazy/SpotifyAPI-NET/edit/master/SpotifyAPI.Docs/versioned_docs/version-5.1.1/auth/getting_started.md",version:"5.1.1",lastUpdatedBy:"Jonas Dellinger",lastUpdatedAt:1594649188,sidebar:"version-5.1.1/someSidebar",previous:{title:"Utilities",permalink:"/SpotifyAPI-NET/docs/web/utilities"},next:{title:"Implicit Grant",permalink:"/SpotifyAPI-NET/docs/auth/implicit_grant"}},p=[{value:"Auth-Methods",id:"auth-methods",children:[]}],l={rightToc:p};function b(e){var t=e.components,n=Object(a.a)(e,["components"]);return Object(i.b)("wrapper",Object(r.a)({},l,n,{components:t,mdxType:"MDXLayout"}),Object(i.b)("h2",{id:"auth-methods"},"Auth-Methods"),Object(i.b)("p",null,"Before you can use the Web API's full functionality, you need the user to authenticate your Application.\nIf you want to know more, you can read to the whole auth-process ",Object(i.b)("a",Object(r.a)({parentName:"p"},{href:"https://developer.spotify.com/web-api/authorization-guide/"}),"here"),"."),Object(i.b)("p",null,"Before you start, install ",Object(i.b)("inlineCode",{parentName:"p"},"SpotifyAPI.Web.Auth")," and create an application at Spotify: ",Object(i.b)("a",Object(r.a)({parentName:"p"},{href:"https://developer.spotify.com/my-applications/#!/applications"}),"Your Applications")),Object(i.b)("p",null,"After you have created your Application, you will have following important values:"),Object(i.b)("table",null,Object(i.b)("thead",{parentName:"table"},Object(i.b)("tr",{parentName:"thead"},Object(i.b)("th",Object(r.a)({parentName:"tr"},{align:null}),"Name"),Object(i.b)("th",Object(r.a)({parentName:"tr"},{align:null}),"Description"),Object(i.b)("th",Object(r.a)({parentName:"tr"},{align:null})))),Object(i.b)("tbody",{parentName:"table"},Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(r.a)({parentName:"tr"},{align:null}),Object(i.b)("strong",{parentName:"td"},"Client_Id")),Object(i.b)("td",Object(r.a)({parentName:"tr"},{align:null}),"This is your client_id, you don't have to hide it"),Object(i.b)("td",Object(r.a)({parentName:"tr"},{align:null}))),Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(r.a)({parentName:"tr"},{align:null}),Object(i.b)("strong",{parentName:"td"},"Client_Secret")),Object(i.b)("td",Object(r.a)({parentName:"tr"},{align:null}),"Never use this in one of your client-side apps! Keep it secret!"),Object(i.b)("td",Object(r.a)({parentName:"tr"},{align:null}))),Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(r.a)({parentName:"tr"},{align:null}),Object(i.b)("strong",{parentName:"td"},"Redirect URIs")),Object(i.b)("td",Object(r.a)({parentName:"tr"},{align:null}),"Some of auth flows require that you set the correct redirect URI"),Object(i.b)("td",Object(r.a)({parentName:"tr"},{align:null}))))),Object(i.b)("p",null,"Now you can start with the user-authentication. Spotify provides 3 ways (4 if you consider different implementations):"),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("p",{parentName:"li"},Object(i.b)("a",Object(r.a)({parentName:"p"},{href:"/SpotifyAPI-NET/docs/auth/implicit_grant"}),"ImplicitGrantAuth"))),Object(i.b)("li",{parentName:"ul"},Object(i.b)("p",{parentName:"li"},Object(i.b)("a",Object(r.a)({parentName:"p"},{href:"/SpotifyAPI-NET/docs/auth/authorization_code"}),"AutorizationCodeAuth"))),Object(i.b)("li",{parentName:"ul"},Object(i.b)("p",{parentName:"li"},Object(i.b)("a",Object(r.a)({parentName:"p"},{href:"/SpotifyAPI-NET/docs/auth/client_credentials"}),"ClientCredentialsAuth"))),Obj