i found that it seems to work
When you get this Invalid redirect URI page, copy the URL from that page
Open https://www.urldecoder.org/ and paste the URL in the top box and encode the URL
Copy the URL after the part …&redirect_uri= and before the next & (e.g. &state=)
Enter this URI in your spotify app in the redirect URI
For homeassistant users, it could look something like this:
http://homeassistant.local:8123/api/hassio_ingress/bla-bla/spotify-credentials/auth/callback
Hope this may help others as well.
Found the solution here: