Trouble Accessing Spotify API with Google-Linked Account
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am encountering a consistent issue when attempting to access the Spotify API using accounts that have been created through or linked with Google. The login flow works perfectly for Spotify accounts with direct credentials, but when using Google as an authentication provider, the process results in an HTTP 403 Forbidden error.
Here's a brief outline of the problem:
Environment: Node.js server application using the spotify-web-api-node library.
Flow Used: Authorization Code Flow, as recommended for server-side applications.
Issue: The API call to spotifyApi.getMe() throws an error after successfully obtaining the access and refresh tokens. This only occurs when the user logs in through Google, not with Spotify's native credentials.
Error Message: "Error getting Tokens: WebapiError: [object Object]" with a status code of 403.
Attempted Resolutions: Ensuring that the Redirect URI matches exactly as configured in the Spotify Developer Dashboard, confirming that the CLIENT_ID and CLIENT_SECRET are correctly set, and checking the requested scopes. The issue persists despite these checks.
Here is my callback function
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page