mirror of
https://github.com/jwilsson/spotify-web-api-php.git
synced 2026-04-27 07:55:49 +03:00
[GH-ISSUE #197] Multiple instances / sessions #135
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#135
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 @brandonmcconnell on GitHub (Jul 12, 2020).
Original GitHub issue: https://github.com/jwilsson/spotify-web-api-php/issues/197
What is the best practice for having multiple simultaneous Spotify API sessions? I'd like to allow multiple users from around the web to all show what they're listening to simultaneously, which will all display simultaneously from the same dashboard.
Do I just need to start a
new SpotifyWebAPI\Sessionper user? Will that allow the app to continuously read data from their account and refresh tokens without repeated authentication so their status is publicly available? Ideally, one person should be able to see what anyone else on the platform is listening to and be able to also tune into what someone else is listening to, so there will also be two levels of sessions: (1) external sessions of all other users on the platform, and (2) the current user's internal session.Sorry if this isn't the correct medium for a question like this. Wasn't sure where else to go.
@jwilsson commented on GitHub (Jul 12, 2020):
Hey!
Yeah, one
Sessioninstance per user should do the trick. Reusing the sameSessioninstance could work but it would be more work updating it with the correct tokens. One per user should be easier to work with.@brandonmcconnell commented on GitHub (Jul 12, 2020):
Perfect, thanks!