Open levino opened 2 years ago
Hey @levino thanks for the iOS link, it has been a saviour! Any luck on getting an android link to open the app?
Sorry @neuronandchords for the late reply. I am no longer working on the project with that codebase and I cannot remember if and if then how I achieved this. Since I did not come back to this, probably I did not succeed.
For Android, you will need the following:
intent://accounts.spotify.com/inapp-authorize?YOUR_PARAMS#Intent;package=com.spotify.music;scheme=https;end
By some digging and reverse engineering I found out that in order to start a (standard) oauth code flow on ios I have to open
spotify-action://authorize?response_type=code&client_id=XXX&scope=user-read-email&redirect_uri=XXX
on iOS. I can then handle the callback nicely in my app and retrieve the code. This url does not work however on Android. I triedspotify://authorize?response_type=code&client_id=XXX&scope=user-read-email&redirect_uri=XXX
andspotify-sdk://authorize?response_type=code&client_id=XXX&scope=user-read-email&redirect_uri=XXX
without success. If I usehttps://accounts.spotify.com/authorize?response_type=code&client_id=XXX&scope=user-read-email&redirect_uri=XXX
the web browser is opened, which is not what I want. I want the (installed, I can check that) spotify app to be opened and handle the request. What is the correct URL to open the spotify app?To be honest I am a little frustrated that this information (also the iOS URL) is kind of obscured somewhere within the iOS and Android SDK, which makes very little sense to me. Please provide this information plainly in the docs.