const client_id = "86b57478283e4fa08dec17a50a307a8c"; const redirect_uri = "http://127.0.0.1:4321/api/spotify/callback.json"; const scopes = "user-read-currently-playing user-read-playback-state"; const authUrl = new URL("https://accounts.spotify.com/authorize"); authUrl.searchParams.append("client_id", client_id); authUrl.searchParams.append("response_type", "code"); authUrl.searchParams.append("redirect_uri", redirect_uri); authUrl.searchParams.append("scope", scopes); // Redirect user to this URL console.log("Visit this URL to authorize:", authUrl.toString());