Spotify API - How to get a Playlist (API-Review Series)
HTML-код
- Опубликовано: 28 сен 2024
- How to get a Spotify Playlist via API - download the node.js source code: api-university...
In this week's episode, I review the Spotify API. My goal: get a list of all the songs in a given Spotify playlist. To achieve this goal, I will go to the dev portal, learn about the API, use the API, and write a node.js application.
Follow along or just watch and learn (from my mistakes ;-).
Learn about APIs and API Security in a more structured way, with step-by-step guides:
🎥 Video Course on API Security with OAuth: api-university...
🎥 Video Course on RESTful API Design: api-university...
🎥 Video Courses on other API Topics: api-university...
📗 Book on API Security with OAuth: api-university...
📗 Book on RESTful API Design: api-university...
📚 Books on other API Topics: api-university...
👕 Get your "I ❤️ APIs" Shirt api-university...
Subscribe and follow me on my journey and explore some great APIs. New episodes are airing 🗓️ each Wednesday 18:00 CEST (9:00 PDT)! Don't miss any upcoming episode and subscribe to the api-university channel.
Download the node.js source code developed in the video: api-university.com/blog/spotify-api-how-to-get-an-oauth-access-token-api-review-series/
var playlist_url = playlists.items[1].href;
^
TypeError: Cannot read property '1' of undefined
getting this error help
The authentication part works, but the node one doesn't.
please paste you script in pastebin or github
Download the node.js source code developed in the video: api-university.com/blog/spotify-api-how-to-get-an-oauth-access-token-api-review-series/
Please, add tutorial for Deezer API :C have error there instead of redirect with param. 'code'
Great video, thanks!
is there a script to fetch the ISRC of the song? if yes could you paste it here :) thanks
what is the isrc?
@@Api-university Its a international number for recordings. I basically want to make a program that gets a spotify song link and fetches the isrc code via the spotify api. After fetching the code it should search for the same song from other platforms like apple music, amazon music and more.
thank you brother for this
Can you use the API to get the song playing within your application?
var playlist_url = playlists.items[1].href;
^
TypeError: Cannot read property '1' of undefined
getting this error
ok, have you watched the video to the end?
API-University Would you please share a gist for this?
Download the node.js source code developed in the video: api-university.com/blog/spotify-api-how-to-get-an-oauth-access-token-api-review-series/
How you got that user id?
there is an api call for it.
+API-University Hello Im watching your videos on How to connect to the Spotify API, one question i have for you is how can i make my authentication page load first before navigating to my website?
There are a number of techniques for this. A simple one: Check if you have an active session (or a valid token), and if not, make a redirect to your login page. There are a couple of security implications that you would have to look into.
To learn more about OAuth, check this book:
api-university.com/books/oauth-2-0-book/
and get the free OAuth Cheatsheet:
api-university.com/oauth-cheat-sheet/
@API-University I fixed my error by building a restAPI that stored my credentials then deployed my api to heroku and used axios call via URL for my authorization credentials then everything worked
@@ktown5422 glad you could fix it