ios-sdk icon indicating copy to clipboard operation
ios-sdk copied to clipboard

How to fetch the user playlist and corresponding details?

Open auro-krishna opened this issue 6 years ago • 5 comments

auro-krishna avatar Apr 22 '20 08:04 auro-krishna

Using the web api

rolflocher avatar May 05 '20 16:05 rolflocher

@rolflocher Is it not possible to do using Spotify SDK?

auro-krishna avatar May 06 '20 04:05 auro-krishna

@rolflocher I've tried using web api to fetch playlist but it shows me authentication error. Could you please help understand the whole process of how to achieve this? Because in official Spotify iOS SDK docs only authentication & playback process is written. So, how can we use Web APIs into mobile applications? Thanks

rjt3662 avatar Aug 16 '20 13:08 rjt3662

You need to go through one of their auth cycles to get an access token. Then you can hit the Web API endpoints with the token in the header for auth just like you would fetch json from any other url.

If you are using the SessionManager auth cycle, the access token is available in the SessionManagerDelegate didInitiate

@rjt3662

rolflocher avatar Aug 26 '20 16:08 rolflocher