mirror of
https://github.com/jwilsson/spotify-web-api-php.git
synced 2026-04-27 16:05:51 +03:00
[GH-ISSUE #48] Access Token #26
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#26
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 @ghost on GitHub (Jun 16, 2016).
Original GitHub issue: https://github.com/jwilsson/spotify-web-api-php/issues/48
Hi again, im getting user's infos in normal way but when i change my page i can t reach api anymore. In error log it says Invalid authorization code when i set a session like ($_SESSION['spot_kod'] = $_GET['code'];) and trying to use it in another php file like;
$this->session->requestAccessToken($_SESSION['code']);
$this->api->setAccessToken($this->session->getAccessToken());
so what is problem here? how can i use api with a valid access token in another php file?
@jwilsson commented on GitHub (Jun 17, 2016):
Hi!
The code is only valid once, to request an access token. You need to pass the access token along instead, for example:
First page
Second page