Reputation: 21
I'm trying to automate the creation of a token with the Spotify API, however the headless browsers I try to use always error at 'Invalid redirect_uri'. Currently I'm trying to use Spynner and Ghost.py, but both end up at the same problem point.
What I know so far:
The authorization URL is valid, as I can copy that into chrome and it will redirect to link with Spotify's response code
The redirect URI is also valid, again as I get a valid response through chrome
One odd note is when using Spynner, I check error response code and I note that the % sign has been replaced by %25. I'm not sure if this is being done by pyqt4, and I wonder if the second encoding of special characters is causing the problem. I tried passing a url without escaped special characters, but that didn't work either.
I'm at a loss as to why I can't get this to work. Why would a link in a headless browser not redirect like in Chrome?
Upvotes: 0
Views: 1340
Reputation: 1275
Check your App's settings at https://developer.spotify.com/my-applications/. The redirect URI there needs to exactly match the one you use in order for Spotify to redirect.
Upvotes: 1