spotify / web-playback-sdk

This issue tracker is no longer used. Join us in the Spotify for Developers forum for support with the Spotify Web Playback SDK ➡️ https://community.spotify.com/t5/Spotify-for-Developers/bd-p/Spotify_Developer
106 stars 7 forks source link

How to get the device list? #69

Open WalkMeHome19 opened 5 years ago

WalkMeHome19 commented 5 years ago

Steps to reproduce:

  1. Created Webplayer
  2. Plays Song on the webplayer

Expected behaviour:

Showing User's playlist

Actual behaviour:

Doesn't show it :x

Hey guys,

maybe I am just to stupid to get the code right. But how do I get the user's device list?

I am not able to get the right code.
I've tried a lot the last few hours...used google...but I do not know how to do it right. How do I implement the "https://api.spotify.com/v1/me/player/devices" thing? I've tried it with "fetch" I've tried it with a simple http request... but it's not working.

My final aim is that I can choose a device first and play the song via this device...

I hope you understand what I mean,,,

Thanks a lot!!

gilbarbara commented 5 years ago

You'll need to add user-read-playback-state in the scope of your token request. Check https://react-spotify-web-playback.gilbarbara.dev/ for a working example.