mirror of
https://github.com/jwilsson/spotify-web-api-php.git
synced 2026-04-27 07:55:49 +03:00
[GH-ISSUE #69] callback part via cURL #34
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#34
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 @dayeggpi on GitHub (Mar 3, 2017).
Original GitHub issue: https://github.com/jwilsson/spotify-web-api-php/issues/69
Hi,
Is there anyway of handling the callback part via cURL and not with
header('Location: ' . $session->getAuthorizeUrl($scopes));This would allow the use of the script into mobile and other application that don't handle very well the redirection part...
Or is there a way to make a cURL call on a page.php that use this wrapper ? at the moment the cURL response is 302 as it redirects to the spotify authorize page...
Thanks !
@jwilsson commented on GitHub (Mar 3, 2017):
Hmm, the callback part can be handled however you like. The user will, however, always be redirected back to the callback URL. But you can send the user to Spotify's authorization page anyway you like.
Some more info about the whole flow: https://developer.spotify.com/web-api/authorization-guide/#authorization-code-flow
@dayeggpi commented on GitHub (Mar 3, 2017):
so technically, there is no way to have :
http://mysite.com/index.php : with this wrapper coded, to fetch an artist page link, for example)
then
http://hissite.com/curl.php : calling the above link in curl, to get the artist page link as a response (dom parser etc for example)
I guess it is not possible since at some point, there will be a redirection to Spotify auth page.
Unless it is possible to do so via cURL ?
@jwilsson commented on GitHub (Mar 5, 2017):
If you don't need any user data, the Client Credentials Flow can be used without any redirects.
If you need user data, I don't think it's possible to do it just via cURL.