Reputation: 1
I'm making a script that gets my latest played song from Spotify. I seem to need authentication. I've registerd my app and am making a curl to Spotify
https://accounts.spotify.com/authorize?client_id=MYCLIENTID&response_type=code&scope=playlist-read-private&show_dialog=true&redirect_uri=http%3A%2F%2Fwww.stevenliemberg.nl%2Fspotify%2F%3Faction%3DrequestAcces
I do get a login screen, but when I try to login with Facebook I get a generic text saying 'the developer has done something wrong' that ends up in a recursive loop. Once you click ok, the error comes back.
When I try to login via the form with my userID (I can't use email addresses to log on, as I get an error on typing @) it says something's "gone wrong".
The return uri is registered to my app. Does anyone have an idea what's going on? Is it my account or my code?
Upvotes: 0
Views: 758
Reputation: 4830
I'm not sure why you are curling the authorize endpoint, it's meant for your application to direct your users there.
I assume that your web server on http://www.stevenliemberg.nl has an endpoint at /spotify/, handling the query parameter action=requestAcces. (typo?) I also assume that this exact redirect URI is registered for your client ID in https://developer.spotify.com/my-applications/. It's of course important that you don't direct them back at the authorization URL after this, as that would create a redirection loop.
It's correct that if you don't use Facebook to log in, you only provide a username. If you originally registered through Facebook, I believe you can find your username by going to https://www.spotify.com/us/account/overview/.
Upvotes: 1