mirror of
https://github.com/jwilsson/spotify-web-api-php.git
synced 2026-04-27 07:55:49 +03:00
[GH-ISSUE #34] refreshAccessToken leads to blank page #19
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#19
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 @BillyCallahan on GitHub (May 11, 2015).
Original GitHub issue: https://github.com/jwilsson/spotify-web-api-php/issues/34
Hello,
I have a problem using the API: when I use the refreshAccessToken() function I get a blank page.
In local it works, but when I upload it on my server it stops working...Would you know why ?
Here's the code:
$session = new SpotifyWebAPI\Session('730c01f53af44936a0cc51459f0cb0ea', 'e1fc633ca35141bdb6edca04632850e7', '');
$api = new SpotifyWebAPI\SpotifyWebAPI();
$refreshToken = $_SESSION['refreshToken'];
$session->setRefreshToken($refreshToken);
$session->refreshAccessToken();
$accessToken = $session->getAccessToken();
// Request a access token using the code from Spotify
$refreshToken = $session->getRefreshToken();
$_SESSION['refreshToken'] = $refreshToken;
// Set the new access token on the API wrapper
$api->setAccessToken($accessToken);
@jwilsson commented on GitHub (May 11, 2015):
Could you enable PHP error reporting, either via php.ini or by adding these lines at the top of the file:
And then post the error here?
@BillyCallahan commented on GitHub (May 11, 2015):
Hello :)
Thanks for helping, I tried this and it appears that the problem came from an Invalid URI...
I'm sorry to bother you for this kind of errors, but now I know how to display errors at least.
Thanks again,
Audric Manaud.