spotify / web-api

This issue tracker is no longer used. Join us in the Spotify for Developers forum for support with the Spotify Web API ➡️ https://community.spotify.com/t5/Spotify-for-Developers/bd-p/Spotify_Developer
982 stars 79 forks source link

Authorization code expired #1456

Open omadepod opened 4 years ago

omadepod commented 4 years ago

Hi all,

I didn't write down my accesstoken and didn't have the refreshtoken code in my project. So now i keep getting "Authorization code expired". I tried to make a new project but i keep getting the same error.

Thanks

Ashley-Waldron commented 4 years ago

You'll need to just generate a new token again.

omadepod commented 4 years ago

When i get redirected to my callback.php i get this authorization code

Array ( [code] => AQBeH28UwSp... )

I call this function

$session->requestAccessToken($_GET['code']);

/

Fatal error: Uncaught SpotifyWebAPIAuthException: Invalid authorization code in C:\xampp\htdocs\system\spotify\src\Request.php:54 Stack trace: #0 C:\xampp\htdocs\system\spotify\src\Request.php(254): ... #3 C:\xampp\htdocs\system\spotify\callback.php(61): Session->requestAccessToken('AQBeH28UwSpTV2y...')