mirror of
https://github.com/jwilsson/spotify-web-api-php.git
synced 2026-04-26 23:45:49 +03:00
[GH-ISSUE #248] since 2 days access tokens give an error #178
Labels
No labels
bug
docs
enhancement
enhancement
enhancement
feedback wanted
good first issue
help wanted
help wanted
help wanted
invalid
pull-request
question
question
upstream
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotify-web-api-php#178
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kasperkamperman on GitHub (Jun 10, 2022).
Original GitHub issue: https://github.com/jwilsson/spotify-web-api-php/issues/248
Hi,
Since 1-2 day my spotify service broke down (basyl.stream). I didn't touch anything, so I'm figuring out what could be the cause of this.
The reason that I post this issue, is to figure out if other people had a same issue suddenly (maybe something changed on the Spotify side).
The strange thing is that a service I run with the same Spotify account and credentials still keeps working. For that service I don't use the "new" refresh implementation, but a try-catch function (as once suggested, before this was implemented in the web-api): https://github.com/jwilsson/spotify-web-api-php/issues/237#issuecomment-964478065
Below the error details (I don't know if there exist already a better way to print it, since some details seem to be cut a way).
@kasperkamperman commented on GitHub (Jun 10, 2022):
I did some tests.
The client_id/secret/refreshtoken seem to work fine. I'm able to obtain a new accessToken. However, when I use it
print_r($api->me());, it directly says its invalid.@kasperkamperman commented on GitHub (Jun 13, 2022):
I made a minimal example. Like mentioned with an old version of your API (I'm not sure which version, I think 3 or 4) I can get access correctly.
I have this example and the print_r output of the $api. I'm curious if you see something wrong.
This gives the following output:
@kasperkamperman commented on GitHub (Jun 13, 2022):
I figured out the error, it seems that accessTokens have a higher character count since a few days (I count 287). My database field to store the token was set to a maximum of 255 characters.
My old implementation would request a new one and continue. Your implementation probably handles this in a different way (although I would expect also that it would continue with the call when the new access token is received).