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.

Комментарии • 26

  • @Api-university
    @Api-university  4 года назад

    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/

    • @tarankit5436
      @tarankit5436 4 года назад +1

      var playlist_url = playlists.items[1].href;
      ^
      TypeError: Cannot read property '1' of undefined
      getting this error help

    • @gustavomonte6672
      @gustavomonte6672 3 года назад

      The authentication part works, but the node one doesn't.

  • @RandomicoGames
    @RandomicoGames 5 лет назад +6

    please paste you script in pastebin or github

    • @Api-university
      @Api-university  4 года назад +1

      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/

  • @Арт-ф4у
    @Арт-ф4у 10 месяцев назад

    Please, add tutorial for Deezer API :C have error there instead of redirect with param. 'code'

  • @chillmer4724
    @chillmer4724 5 лет назад +1

    Great video, thanks!

  • @berkay478
    @berkay478 4 года назад +1

    is there a script to fetch the ISRC of the song? if yes could you paste it here :) thanks

    • @Api-university
      @Api-university  4 года назад +1

      what is the isrc?

    • @berkay478
      @berkay478 4 года назад

      ​@@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.

  • @shixuo
    @shixuo 2 года назад

    thank you brother for this

  • @johnlanni7731
    @johnlanni7731 3 года назад +1

    Can you use the API to get the song playing within your application?

  • @tarankit5436
    @tarankit5436 4 года назад

    var playlist_url = playlists.items[1].href;
    ^
    TypeError: Cannot read property '1' of undefined
    getting this error

    • @Api-university
      @Api-university  3 года назад

      ok, have you watched the video to the end?

  • @djmtype
    @djmtype 4 года назад

    API-University Would you please share a gist for this?

    • @Api-university
      @Api-university  4 года назад

      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/

  • @mayankkataria7080
    @mayankkataria7080 3 года назад

    How you got that user id?

  • @ktown5422
    @ktown5422 5 лет назад

    +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?

    • @Api-university
      @Api-university  5 лет назад

      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.

    • @Api-university
      @Api-university  5 лет назад

      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/

    • @ktown5422
      @ktown5422 5 лет назад

      @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

    • @Api-university
      @Api-university  5 лет назад

      @@ktown5422 glad you could fix it