Announcements

Help Wizard

Step 1

NEXT STEP

Spotify iOS Authentication with installed Spotify App

Spotify iOS Authentication with installed Spotify App

Hi,

I have an iOS app that integrates with the Spotify API, and currently, users log in via Safari with their username and password through the Spotify Auth flow.

 

One of the biggest pain points for my users is the login flow--they don't remember their Spotify login information so they simply don't log in and abandon.

 

Instead of authenticating through the Spotify website, is there a way to authenticate with the installed Spotify app (if it is installed), for example, opening the Spotify app with auth parameters using URL schemes instead of opening the login URL in Safari?

 

Does the Spotify iOS SDK allow users to authenticate using the Spotify app? Or is there a way to manually to it with deeplinking/URL schemes (e.g. something like Spotify://login?callback=MyApp://login-success)?

 

Thanks!

Ellek

Reply
3 Replies

??

Hello, did you ever have any luck with this?

You can use the iOS SDK to authenticate with the app. Specifically this endpoint authorizeAndPlayURI. With this, it posts back in an OAuth sequence as described here from which you can extract an access token.

 

It is good for one hour and I believe it can be used with the web API.

Some considerations:
* Spotify will start playing music. You could use a delegate to suddenly pause the track once it connects successfully, but there will be a delay and you may hear a blip of music for 2 or 3 seconds. Not the end of the world, but it may catch the user off guard.
* The iOS SDK has not been updated in years and can be hard to work with at times

Suggested posts