bitcoin-coder-bob / Save-Spotify-Playlists

Save Weekly Discover and Release Radar playlists from Spotify
2 stars 0 forks source link

Guidance for getting codeQueryParam #1

Open lucasmoten opened 3 years ago

lucasmoten commented 3 years ago

In releaseRadar.go and discoverWeekly.go, near the top are these comments

    // Follow this link and after you authenticate, it will redirect, and the url will have a code query parameter. Paste the code in codeQueryParam variable below.
    // https://accounts.spotify.com/authorize?client_id=&response_type=code&redirect_uri=https%3A%2F%2Fexample.com%2Fcallback&scope=playlist-read-private%20playlist-modify-private%20playlist-modify-public%20user-read-email&state=34fFs29kd09
bitcoin-coder-bob commented 3 years ago

I purposely yanked it out here. You can get your own by registering a new app (for free) at: https://developer.spotify.com/dashboard/applications

The redirect is necessary, as Spotify will redirect to that URL after you grant access via oAuth in the browser. The redirect will have a query parameter called code that you will need to use for the codeQueryParam value.

Yeah this is all janky until I just host this in a lambda with a webpage you can hit and all of this will be abstracted away.