Announcements

Help Wizard

Step 1

NEXT STEP

https://api.spotify.com/v1/me errors aren't handled by nodejs SDK properly.

https://api.spotify.com/v1/me errors aren't handled by nodejs SDK properly.

Plan

Premium

My Question or Issue

I've been using the nodejs Spotify SDK to interact with the Spotify Web API. I was successfully getting access tokens for a user that granted my Spotify app access, but then when I ran .getMe() it returned a 403. 

The error message could not be unpacked so I had no idea why the access tokens I just got weren't working. Scopes were all fine.

I finally ran a curl request to https://api.spotify.com/v1/me and saw a real error - I didn't add the user to the Spotify App dashboard. Once I added the user to the Spotify Dashboard it worked.

 

Two issues here;

1- why am I getting an access token for a user if I'm not able to act on those tokens? Seems like a mismatch. I should probably not get a token to begin with if the user isn't added to the spotify app
2- most importantly, the error message should probably be parsed and returned in the Spotify JS sdk so I can debug these issues more easily.


Screenshot 2024-11-12 at 4.10.06 PM.png
Reply
0 Replies

Suggested posts

Let's introduce ourselves!

Hey there you,   Yeah, you! 😁   Welcome - we're glad you joined the Spotify Community!   While you here, let's have a fun game and get…

ModeratorStaff / Moderator/ 4 years ago  in Social & Random