Auth API Invalid Client: Invalid Redirect URI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I access Spotify API on my local machine without any problem. I supply to spotify auth request my local address as redirect_uri parameter(http://localhost:8080) and I also added this URI in the Spotify Developer Console to the whitelist.
But when I deploy my app to AWS I have a url like this: http://myapp-env.eu-west-2.elasticbeanstalk.com/
So I added this url to whitelist on Spotify Developer Console too and sending this url to Spotify authorization request as redirect_uri parameter. But this time spotify returns 'Invalid Client: Invalid Redirect URI' error. Is there something wrong with the AWS url?
EDIT: I discovered that when you pass a uri that is whitelisted in the Spotify Developer Console, if the hostname of the machine making the request does not match the host of the uri, spotify returns invalid_redirect_uri.
So maybe it's because AWS has load balancing and the hostname of the machine is different than the url above. Is there any way to workaround this?
- Labels:
-
API Support
-
authorization
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page