mirror of
https://github.com/jwilsson/spotify-web-api-php.git
synced 2026-04-26 23:45:49 +03:00
[GH-ISSUE #85] "No token provided" error #45
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#45
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 @hakhagmon on GitHub (Jun 1, 2017).
Original GitHub issue: https://github.com/jwilsson/spotify-web-api-php/issues/85
`PHP Fatal error: Uncaught SpotifyWebAPI\SpotifyWebAPIException: No token provided in spoty\vendor\jwilsson\spotify-web-api-php\src\Request.php:39
Stack trace:
#0 spoty\vendor\jwilsson\spotify-web-api-php\src\Request.php(240): SpotifyWebAPI\Request->parseBody(Object(stdClass), 401)
#1 spoty\vendor\jwilsson\spotify-web-api-php\src\Request.php(108): SpotifyWebAPI\Request->send('GET', 'https://api.spo...', 'offset=0', Array)
#2 spoty\vendor\jwilsson\spotify-web-api-php\src\SpotifyWebAPI.php(561): SpotifyWebAPI\Request->api('GET', '/v1/artists/0rd...', Array, Array)
#3 spoty\spotycount.php(32): SpotifyWebAPI\SpotifyWebAPI->getArtistAlbums('0rdOduCP1sLQHOM...', Array)`
¯ \ _ (ツ) _ / ¯
@jwilsson commented on GitHub (Jun 1, 2017):
This sounds it's related to Spotify's change on May 29th where they started requiring access tokens for all requests (see this blog post).
I'm guessing you're not requesting any user information so the Client Credentials Flow should be enough for your use case.
@jwilsson commented on GitHub (Jun 1, 2017):
Sorry, I messed up the link to the blog post. Here's the correct one: https://developer.spotify.com/news-stories/2017/01/27/removing-unauthenticated-calls-to-the-web-api/
@hakhagmon commented on GitHub (Jun 1, 2017):
thx!
Added this and everything turned out well
@jwilsson commented on GitHub (Jun 2, 2017):
Great, glad to hear it worked out!