- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I previously had an issue around redirect_uri that was quickly clarified and solved (thank you! 😁). My app runs perfectly locally, but now that I've deployed it on Heroku, I'm running into a related and confusing issue. To confirm, the 'redirect_uri' setting matches exactly in both the code and in the app settings in Spotify. I've experimented with different valid URIs and had the same result.
Authentication is working locally, however, when deployed to a production server, the authentication breaks at the point after logging in to Spotify and the user is authorized. The user should then be returned to my app to enter a playlist URL, but instead is being sent to redirect_uri/?+code=+state=, which results in a browser error:"Unable to connect / Firefox can’t establish a connection to the server at 127.0.0.1:5000."
Instead of getting an access_token and refresh_token in the redirect_uri, I instead get ?code. Have you seen this before? e.g. http://redirect_uri.com/?code=xxxx&state=xxxx
For example:
http://127.0.0.1:5000/callback?code=AQDuFlTFC60VS0PO3ol90qMFJb0RgcX9y9Bjd7Zs7oiZwnnfkcTMd0oGxHEMFrQOVVaLPb8xiV23ca5IaKPu5aS-1hCuPfkQC-EII3J9sWGLaFfay1Jv8UzeSJEcln0F6wyt_h-azqMvLRUJ_l3FvFKWIhPtJjvdYLX-HueqIhRHAo5qur2sNxA2ObYilskrG2jpzpvi14Aw&state=OJ3M2R57892U2H2P
Solved! Go to Solution.
- Labels:
-
Spotipy
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page