Skip to content

Spotify does not accept localhost and hyphens #25805

Description

@matndev

Bug Description

Requirements from Spotify :

  • Use HTTPS for your redirect URI, unless you are using a loopback address, when HTTP is permitted.
    
  • If you are using a loopback address, use the explicit IPv4 or IPv6, like http://127.0.0.1:PORT or http://[::1]:PORT as your redirect URI.
    
  • localhost is not allowed as redirect URI.
    

https://developer.spotify.com/documentation/web-api/concepts/redirect_uri

So I changed localhost to 127.0.0.1 but now the hyphens seems causing problems :
https://community.spotify.com/t5/Spotify-for-Developers/Local-Redirect-URI-does-not-accept-hyphen-minus/td-p/6929053

Even if the team said the issue was fixed I'm still facing this problem.

To Reproduce

  1. Select Spotify component in n8n and use http://localhost:5678/rest/oauth2-credential/callback as callback
  2. Add same URI in Spotify app configuration
  3. Try "Connect my account" in n8n

Expected behavior

I should be connected

Debug Info

I get this error : INVALID_CLIENT: Invalid redirect URI

Operating System

Windows 11

n8n Version

2.4.5

Node.js Version

24.13.0

Database

SQLite (default)

Execution mode

main (default)

Hosting

self hosted

Metadata

Metadata

Assignees

No one assigned

    Labels

    closed:support-issueIssue is not a bug, This may include license, billing, cloud instance or how-to questionsstatus:in-linearIssue or PR is now in Lineartriage:completeTriage has been completed and issue is ready for internal teams

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions