The Spotify for Developers platform provides access to the APIs and SDKs that power these features.

If you dont already have one, visitthe Spotify signup page.

However, if you already have one, sign in to theSpotify for Developersconsole.

New Application settings page on spotify’s developer dashboard

Lastly, choose theEdit Settingsbutton to change to the redirect URL controls.

Since your utility is still in development mode, add http://localhost:3000 as your redirect URL.

This is the URL you want to redirect the user to after they authenticate with Spotify.

Application settings page on spotify’s developer console.

you’re able to get your client ID from Spotify’s developer dashboard.

you’ve got the option to find this app’s code in itsGitHub repository.

drop in the Required Packages

Install Axios.

You will use its methods to make HTTP requests to Spotify’s web API.

To get the access token, your tool needs to first authenticate with Spotify.

Spotify supports severalauthentication and authorizationmethods such as an authorization code, client credentials, or implicit grant methods.

Upon successful authentication, Spotify will respond by providing an access token that expires over a specified period.

Inside this folder, create a new file: Searcher.js, and add the code below.