mirror of
https://github.com/jwilsson/spotify-web-api-php.git
synced 2026-04-27 07:55:49 +03:00
[GH-ISSUE #169] Implementation Issues (redirect loop or invalid return URI) #108
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#108
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 @thejames76 on GitHub (Oct 30, 2019).
Original GitHub issue: https://github.com/jwilsson/spotify-web-api-php/issues/169
Hello,
I'm trying to implement this wrapper and have had minimal success. I admit I'm a hack-n-slash PHP guy... I know just enough to get by and also get in trouble.
I tried using this example https://gist.github.com/jwilsson/07f30721b5a3378c78bf4c86cdc92b98 as my other attempts failed.
When using the code "as-is" (and it was admittedly not necessarily going to work, so I place no blame on anyone other than myself), I get the error "INVALID_CLIENT: Invalid redirect URI"
When I replace the return URI to use the one from the spotify app, I then get an error from spotify saying there were too many redirects. Not really sure where to go from here, so I'm hoping someone can gently smack me upside the head a bit.
I've attached my index.php and callback.php files (both altered to remove client/site info).
index.txt
callback.txt
** edits: trying to format my source code for the issue
@jwilsson commented on GitHub (Oct 30, 2019):
Hey!
I can't see anything wrong with the code and it's working when I'm running it. A guess is that the session isn't set correctly.
I'd try getting it to work with a single, bare minimum file. Like this, https://gist.github.com/jwilsson/5c91b34c53b1f34f6f7e9995e01f47e8
@thejames76 commented on GitHub (Oct 30, 2019):
Definitely progress here... I'm guessing I'm running into a permissions issue when running $api->getMyCurrentTrack();
I've updated the scopes to include:
user-library-modify
user-read-currently-playing
user-read-playback-state
I've revoked access to the app and re-authorized with the new scopes but get the same error.
@jwilsson commented on GitHub (Oct 30, 2019):
Glad we're making progress!
That sounds like an issue in Spotify's end though, I'd file an issue over there.
@thejames76 commented on GitHub (Oct 30, 2019):
Yep, I can pull back my playlists, just need to figure that out adding / subtracting tracks, etc... (which shouldn't be a problem).
I really appreciate your help with my connection / setup issues.
Thanks!