[GH-ISSUE #154] Can't check if refresh token is revoked #97

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

Originally created by @GrumpyCrouton on GitHub (Mar 25, 2019).
Original GitHub issue: https://github.com/jwilsson/spotify-web-api-php/issues/154

I've got this code

try {
    $session->refreshAccessToken($code);
} catch (SpotifyWebAPIAuthException $e) {
    echo 'Spotify API Error: ' . $e->getCode(); // Will be 404
}

but it doesn't work. When a refresh token has been revoked, I get an internal server error which states "Refresh token revoked", however, I cannot catch this error to do a specific action when this happens.

Originally created by @GrumpyCrouton on GitHub (Mar 25, 2019). Original GitHub issue: https://github.com/jwilsson/spotify-web-api-php/issues/154 I've got this code ``` try { $session->refreshAccessToken($code); } catch (SpotifyWebAPIAuthException $e) { echo 'Spotify API Error: ' . $e->getCode(); // Will be 404 } ``` but it doesn't work. When a refresh token has been revoked, I get an internal server error which states "Refresh token revoked", however, I cannot catch this error to do a specific action when this happens.
kerem closed this issue 2026-02-27 19:26:05 +03:00
Author
Owner

@GrumpyCrouton commented on GitHub (Mar 25, 2019):

Nevermind

<!-- gh-comment-id:476322583 --> @GrumpyCrouton commented on GitHub (Mar 25, 2019): Nevermind
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#97
No description provided.