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

Error: "invalid_grant" #5

Open
ky23mojie opened this issue Aug 17, 2019 · 3 comments
Open

Error: "invalid_grant" #5

ky23mojie opened this issue Aug 17, 2019 · 3 comments

Comments

@ky23mojie
Copy link

Hello,
I deployed application on Heroku, and tried to get the access code by passing curl -X POST -d "code=[code]" https://[myapp].herokuapp.com/api/token.
But I got the error "invalid_grant"

{"error":"invalid_grant","error_description":"Invalid authorization code"}

I checked document on Authorization Guide but couldn't figure out what happened.

The following steps are double-checked again:

  1. I deployed the Heroku App according to the tutorial exactly;
  2. The client ID, client secret and redirect URI set in the Heroku App are identical to my application created in Spotify for Developer.

So far I can not solve the problem by myself.
Does anybody have any hints or experience about solving it?
Thanks!

@Sudok
Copy link

Sudok commented Sep 4, 2019

same issue here, can someone help?

@alfredoxyanez
Copy link

You have to get a the auth code from Spotify. The authcode is returned to you via the Redirect URI

@fotiDim
Copy link

fotiDim commented Oct 5, 2019

It works for me. I am pretty sure there is misconfiguration on your side. Check your SpotifyRedirectURI and your tokenSwapURL. The latter should end with /api/token.

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

4 participants