16.06.2022, 08:14
Has anyone tried to make this work with LM/SL?
https://engineering.atspotify.com/2022/0...layer-api/
https://engineering.atspotify.com/2022/0...layer-api/
Spotify API
|
16.06.2022, 08:14
Has anyone tried to make this work with LM/SL?
https://engineering.atspotify.com/2022/0...layer-api/
16.06.2022, 08:58
Go to https://developer.spotify.com/console/ and get your token. Make sure that you have enabled all scopes that you want to use via API.
Set volume example. You also need device id which can be found here: https://developer.spotify.com/console/ge...e-devices/ Code: 12345678910111213141516171819 http = require('socket.http')
ltn12 = require('ltn12')
json = require('json')
access_token = 'abcdef'
devid = 'abdec'
volume = 40
url = 'https://api.spotify.com/v1/me/player/volume?volume_percent=' .. volume .. '&device_id=' .. devid
res, code, headers = http.request({
url = url,
method = 'PUT',
headers = {
['Authorization'] = 'Bearer ' .. access_token,
['Content-Length'] = 0
}
})
log(res, code, headers)
16.06.2022, 10:50
Wow, thank you very much!
|
« Next Oldest | Next Newest »
|