mirror of
https://github.com/jwilsson/spotify-web-api-php.git
synced 2026-04-27 07:55:49 +03:00
[GH-ISSUE #171] Authorization Scopes Without Redirects? #110
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#110
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 @m00bs on GitHub (Nov 11, 2019).
Original GitHub issue: https://github.com/jwilsson/spotify-web-api-php/issues/171
Is it possible to set an authorization scope without redirects? I'm trying to put a script together that will automate adding tracks to my own personal playlists using your "addPlaylistTracks" function. However, I'm having difficulty adding the scope "playlist-modify-public" and retrieving the updated token as you've described in the docs. Ideally I'm trying to initiate the session with the proper authorization without any redirects.
I'm basically trying to automate the curation process for my list so I have a fresh daily playlist without having to click or approve anything.
My PHP is a bit rusty so any guidance you can provide would be appreciated.
@jwilsson commented on GitHub (Nov 11, 2019):
Hi!
Since you want to access user data you need to perform a redirect at least once. It should be possible to perform the initial redirect flow and then just use the refresh token in your automation script.
For example, something like this should work.
addPlaylistTracksmethod and update the playlists.addPlaylistTracks, save the new access and refresh tokens from step 2.