Angular2 Spotify API

Viewed 41

I'm currently working on a simple application that involves searching Spotify's database for artists and albums. I found a couple of tutorials on how to use their API to make a post request and immediately gain access to their database, but the code is pretty outdated and was looking for something more recent. Would anyone know how to use their API service using modern Angular/Typescript syntax? I'm not exactly understanding the documentation they have listed how to make a post request or get request.

I mainly need help with the initial post request to log me in and gain access. The application will start up with a Search Bar and run an Authorization method within oninit(). So far I have something like:

return this.http.post('https://accounts.spotify.com/api/token', { // Not sure how to use their params or if this is the proper syntax to start });

I also have my clientId and my clientSecret ready as well.

0 Answers
Related