[GH-ISSUE #188] Invalid authorization code #125

Closed
opened 2026-02-27 19:26:12 +03:00 by kerem · 1 comment
Owner

Originally created by @moseleyi on GitHub (May 1, 2020).
Original GitHub issue: https://github.com/jwilsson/spotify-web-api-php/issues/188

I wanted to try out this library and copied the code from the documentation page but upon refreshing my script I'm getting:

Uncaught SpotifyWebAPI\SpotifyWebAPIAuthException: Invalid authorization code

Do I need to do anything specific to get this to work?

Originally created by @moseleyi on GitHub (May 1, 2020). Original GitHub issue: https://github.com/jwilsson/spotify-web-api-php/issues/188 I wanted to try out this library and copied the code from the documentation page but upon refreshing my script I'm getting: ```Uncaught SpotifyWebAPI\SpotifyWebAPIAuthException: Invalid authorization code``` Do I need to do anything specific to get this to work?
kerem 2026-02-27 19:26:12 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@jwilsson commented on GitHub (May 2, 2020):

Hey!
Is the code parameter present in the URL between page loads? It's only valid once. Try to remove it before reloading the page.

<!-- gh-comment-id:622745587 --> @jwilsson commented on GitHub (May 2, 2020): Hey! Is the `code` parameter present in the URL between page loads? It's only valid once. Try to remove it before reloading the page.
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#125
No description provided.