[GH-ISSUE #204] failed while authorizing, why error 'Invalid client' ? #141

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

Originally created by @pepoper on GitHub (Oct 3, 2020).
Original GitHub issue: https://github.com/jwilsson/spotify-web-api-php/issues/204

i'am using laravel 8.0,

code :
$session = new SpotifyWebAPI\Session(
'----XXXX---',
'----XXXX----'
);

    $session->requestCredentialsToken();
    $accessToken = $session->getAccessToken();

this error:
SpotifyWebAPI\SpotifyWebAPIAuthException
Invalid client

Originally created by @pepoper on GitHub (Oct 3, 2020). Original GitHub issue: https://github.com/jwilsson/spotify-web-api-php/issues/204 i'am using laravel 8.0, code : $session = new SpotifyWebAPI\Session( '----XXXX---', '----XXXX----' ); $session->requestCredentialsToken(); $accessToken = $session->getAccessToken(); this error: SpotifyWebAPI\SpotifyWebAPIAuthException Invalid client
kerem closed this issue 2026-02-27 19:26:17 +03:00
Author
Owner

@jwilsson commented on GitHub (Oct 4, 2020):

Hey!
Something seems to be wrong with your Spotify app, sometimes it helps just creating a new one and using that one instead.

<!-- gh-comment-id:703213512 --> @jwilsson commented on GitHub (Oct 4, 2020): Hey! Something seems to be wrong with your Spotify app, sometimes it helps just creating a new one and using that one instead.
Author
Owner

@pepoper commented on GitHub (Oct 6, 2020):

ridiculous case 🙃

solved, apparently because of a problem when copying the CLIENT_ID using the Chrome browser Version 85.0.4183.121, when pasting the CLIENT_ID in the text editor, the result given was different from the original.

alternative way is to use another browser when copying CLIENT_ID, in this case i'am using Mozilla

<!-- gh-comment-id:704025524 --> @pepoper commented on GitHub (Oct 6, 2020): ridiculous case 🙃 solved, apparently because of a problem when copying the CLIENT_ID using the Chrome browser Version 85.0.4183.121, when pasting the CLIENT_ID in the text editor, the result given was different from the original. alternative way is to use another browser when copying CLIENT_ID, in this case i'am using Mozilla
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#141
No description provided.