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

What is the correct "authorize"? url

Open levino opened this issue 3 years ago • 3 comments

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 tried spotify://authorize?response_type=code&client_id=XXX&scope=user-read-email&redirect_uri=XXX and spotify-sdk://authorize?response_type=code&client_id=XXX&scope=user-read-email&redirect_uri=XXX without success. If I use https://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.

levino avatar Jun 06 '22 16:06 levino

Hey @levino thanks for the iOS link, it has been a saviour! Any luck on getting an android link to open the app?

neuronandchords avatar Sep 21 '23 10:09 neuronandchords

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.

levino avatar Oct 11 '23 16:10 levino