Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

401 access token expired manifesting as 400 Bad Request error #210

Open
Shpigford opened this issue Feb 10, 2020 · 0 comments
Open

401 access token expired manifesting as 400 Bad Request error #210

Shpigford opened this issue Feb 10, 2020 · 0 comments

Comments

@Shpigford
Copy link

Shpigford commented Feb 10, 2020

When calling recently_played on a user, RSpotify is returning RestClient::BadRequest (400 Bad Request).

However, if I call me/player/recently-played directly, I get a 401 error:

{
  "error": {
    "status": 401,
    "message": "The access token expired"
  }
}

I'm not sure where in RSpotify things are breaking down, but if there was some way for me to rescue this error myself and force a token refresh, that'd potentially work.

I also checked and expires_at for the user has passed, so seems RSpotify::User.new(connection) should be refreshing the connection as well as the call to recently_played.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant