Reputation: 105
Can Anyone help me to create the Spotify create playlist PHP Library or JavaScript Method ? i have googled many keywords no one posted to create the playlist for the create new one.
Upvotes: 0
Views: 1636
Reputation: 25
Spotify has recently released an API to accomplish this.
Create a Playlist
Create a playlist for a Spotify user. (The playlist will be empty until you add tracks.)
Endpoint
POST https://api.spotify.com/v1/users/{user_id}/playlists
Request Parameters
Path parameter Value
user_id: The user's Spotify user ID.Example Request
curl -X POST "https://api.spotify.com/v1/users/thelinmichael/playlists" -H "Authorization: Bearer {your access token}" -H "Content-Type: application/json" --data "{\"name\":\"A New Playlist\", \"public\":false}"
Explanation of the other parameters and options are available through the link.
Upvotes: 1
Reputation: 483
Its not possible to create a playlist but you can trigger a list of songs to launch in the desktop player by using this format in a link:
spotify:trackset:PlaylistName:49MsPNQCOmxvIYi9AdoPzY,6fUlrsHaz4QfCNF31rk2dU,5KiTsR2h8jnzkvTeucxoAn,6kidUwWb8tB9ktfy7U76iX,6mlUEdb90RqwUisnp65lG7,6KOEK6SeCEZOQkLj5M1PxH,3psrcZoGRaWh6FMGael1NX,3EHLii6bnZxJxsCfLlIb83,0xJtHBdhpdLuClaSQYddI4,6fsdOFwa9lTG7WKL9sEWRU
It does not take you to a nice spotify html page first though, just directly to the player.
UPDATE
As of today there is an api for creating playlists: https://developer.spotify.com/web-api/create-playlist/
Upvotes: 1
Reputation: 18776
There's no web API for creating playlists. If you really want to do this, you'll need to use libSpotify and a wrapper for it (searching for libSpotify php wrapper will get what you need).
Upvotes: 0