spotify

Spotify WebAPI authorization - client credentials flow error invalid_client

自古美人都是妖i 提交于 2019-12-04 09:07:36
Straight forward question, hopefully with a straight forward answer. I'm attempting to implement the client credentials flow via Node.js, using request. Here's my code var request = require('request'); var payload = config.spotify.clientID + ":" + config.spotify.clientSecret; var encodedPayload = new Buffer(payload).toString("base64"); var opts = { url: "https://accounts.spotify.com/api/token", method: "POST", headers: { "Content-Type": "application/x-www-form-urlencoded", "Authorization": "Bearer " + encodedPayload }, body: "grant_type=client_credentials&scope=playlist-modify-public playlist

Spotify App API: Play specific track from album

淺唱寂寞╮ 提交于 2019-12-04 06:44:10
问题 Trying to play a specific track from an album with the player view. It works all good when using player.play(objTrack, objTrack.album); But I don't want the song to autoplay, so I'm using: player.track = objTrack; player.context = objTrack.album; But when I do so, either it won't work at all or it will start playing the first track of the album regardless which track I set. How can I make this work? :/ Thanks. This does not do the trick either. I'm currently trying this method: var album = m

How to refresh Access Token on Spotify SDK for Android?

倾然丶 夕夏残阳落幕 提交于 2019-12-04 05:23:08
I'm making an Android's app using Spotify SDK and Spotify Web Api Android from kaaes. What's the best way to refresh my access token? Since i need to keep the user logged. I don't want that my app ask for log in everytime the users open the app. How can I handle this ? retrofit.RetrofitError: 401 Unauthorized Login to Spotify failed because of invalid credentials Thanks for your time and help! Regards. You need to use the Authorization Code flow from the Spotify Web API to obtain a refresh token that you can use to obtain a new access token when yours expires. For that you need to have a web

Mapping musicbrainz URIs into Spotify URIs

浪子不回头ぞ 提交于 2019-12-04 00:34:42
Does anybody know how can I find Spotify's URI for a given artist/album's musicbrainz URI? Spotify's web-api doesn't solve my problem cause I wanna map all the musicbrainz artists and albums and it's quite slow. You should be able to use the Echo Nest Rosetta Stone Project to map Spotify and MusicBrainz artist ids: http://developer.echonest.com/docs/v4 来源: https://stackoverflow.com/questions/10462343/mapping-musicbrainz-uris-into-spotify-uris

Spotify App API - Playlist Subscribe

久未见 提交于 2019-12-03 22:30:27
Looking at the APP API, it seems like you can determine whether or not a user is subscribed to a playlist or not. However, my app requires the user to be able to subscribe or un-subscribe from a playlist. Is this possible using the Javascript App API at all? For the currently logged in user you can subscribe and unsubscribe from a playlist by setting the playlist's subscribed property. var m = sp.require('sp://import/scripts/api/models') var playlist = m.Playlist.fromURI('spotify:user:<otherUser>:playlist:<playlist>') playlist.subscribed > false playlist.subscribed = true playlist.subscribed >

Hotkey for next song in Spotify

自作多情 提交于 2019-12-03 18:32:37
问题 After March 2015 upgrade of Spotify the below hotkey no longer works to get next song in Spotify: ; Spotify next track <^>!p:: DetectHiddenWindows, On ControlSend, ahk_parent, ^{Right}, ahk_class SpotifyMainWindow DetectHiddenWindows, Off Return The SpotifyMainWindow" appears to be the same when checking with spy, and Ctrl-Right also still works for next song in Spotify, but the hotkey don't. How to make a hotkey for next song in the upgraded Spotify? 回答1: I managed to make it work using

Spotify API: INVALID_APP_ID

烂漫一生 提交于 2019-12-03 12:15:36
I am currently working on an android app which is implementing the Spotify API. I have all of the code connecting my app to spotify using the tutorial and have been working on my app for sometime now. When I play a song through my app after authenticating the user, it works perfectly, that is on my emulator. When I switch it over to my phone it didn't work and gave me an INVALID_APP_ID error in the android response. When I uninstalled spotify off my phone and then tried to login to spotify through my app, I was then able to play music from my phone without any crashes. So my question is how do

Get spotify currently playing track

时光毁灭记忆、已成空白 提交于 2019-12-03 07:50:50
问题 EDIT : Let's try to clarify all this. I'm writing a python script, and I want it to tell me the song that Spotify is currently playing. I've tried looking for libraries that could help me but didn't find any that are still maintained and working. I've also looked through Spotify's web API, but it does not provide any way to get that information. The only potential solution I found would be to grab the title of my Spotify (desktop app) window. But I didn't manage to do that so far. So

Starting a Song from Spotify Intent

。_饼干妹妹 提交于 2019-12-03 06:10:16
问题 Is there anyway to start a Spotify Track from its URI ? I've tried the following approaches but none of them work. When Spotify opens, it always lands in the Playlists page, instead of the track's player. String spotifyTrackURI = "spotify:track:1cC9YJ8sQjC0T5H1fXMUT2"; Intent launchIntent = context.getPackageManager().getLaunchIntentForPackage("com.spotify.mobile.android.ui"); // I've tried with Intent#putExtra().. launchIntent.putExtra( SearchManager.QUERY, spotifyTrackURI ); // or with

Background Audio with cocoalibspotify

蓝咒 提交于 2019-12-03 03:54:07
I've properly enabled background audio for my app (in the plist). Playing the next track after the current is complete using SPPlaybackManager in the background (when the phone is locked/off) doesn't work. When the current track ends, and the audio stops, the app won't begin playing the next track until the phone is unlocked and my app becomes active again. How do I fix this? Here is a snippet of code I'm using to begin the playing of the next track. I observe that the current track becomes nil, and then begin playing the next track. The log shows me that the next current track is being set in