[GH-ISSUE #158] Invalid authorization code #101

Closed
opened 2026-02-27 19:26:05 +03:00 by kerem · 3 comments
Owner

Originally created by @csimpi on GitHub (Jun 7, 2019).
Original GitHub issue: https://github.com/jwilsson/spotify-web-api-php/issues/158

Hi guys,
I don't know what's happening, but I started to get Invalid authorization code error messages during Spotify login. I have no idea why. Is this due to something change in Spotify API?

I'm still getting the code paramter. I pass the parameter to the requestAccessToken() function, every request parameter looks good, but I'm still getting Invalid authorization code in the response.

Redirect URI has been added to the app's whitelisted uri's.

image

Originally created by @csimpi on GitHub (Jun 7, 2019). Original GitHub issue: https://github.com/jwilsson/spotify-web-api-php/issues/158 Hi guys, I don't know what's happening, but I started to get `Invalid authorization code` error messages during Spotify login. I have no idea why. Is this due to something change in Spotify API? I'm still getting the `code` paramter. I pass the parameter to the `requestAccessToken()` function, every request parameter looks good, but I'm still getting `Invalid authorization code` in the response. Redirect URI has been added to the app's whitelisted uri's. ![image](https://user-images.githubusercontent.com/6192067/59101491-fcaf2f00-88dd-11e9-81ab-3bb40ca1893f.png)
kerem closed this issue 2026-02-27 19:26:06 +03:00
Author
Owner

@csimpi commented on GitHub (Jun 8, 2019):

Update: The same code works only if the redirect URI's domain ends with .com.
It doesn't work with my local domain (vagrant.xy.loc),
it doesn't work event with https:// public domain https://xy.localtunnel.me

The redirect URIs are whitelisted of course.

<!-- gh-comment-id:500119910 --> @csimpi commented on GitHub (Jun 8, 2019): Update: The same code works only if the redirect URI's domain ends with `.com`. It doesn't work with my local domain (vagrant.xy.loc), it doesn't work event with https:// public domain https://xy.localtunnel.me The redirect URIs are whitelisted of course.
Author
Owner

@jwilsson commented on GitHub (Jun 10, 2019):

This sounds like something at Spotify's end. I'd file an issue over at https://github.com/spotify/web-api and see if they can help.

<!-- gh-comment-id:500549242 --> @jwilsson commented on GitHub (Jun 10, 2019): This sounds like something at Spotify's end. I'd file an issue over at https://github.com/spotify/web-api and see if they can help.
Author
Owner

@csimpi commented on GitHub (Jun 10, 2019):

@csimpi you're totally right, I should have close this at my previous comment, thank you for your answer again!

<!-- gh-comment-id:500585699 --> @csimpi commented on GitHub (Jun 10, 2019): @csimpi you're totally right, I should have close this at my previous comment, thank you for your answer again!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify-web-api-php#101
No description provided.