Hi!
Any new with spotify connect?
I´ll try to integrate with Spotify developer but I cant´t get new token. (token expire in 1 hour)
I´ve tried to get token with this but i can´t:
https://developer.spotify.com/documentat...tials-flow
If I get token manualy it works perfectly
Any new with spotify connect?
I´ll try to integrate with Spotify developer but I cant´t get new token. (token expire in 1 hour)
I´ve tried to get token with this but i can´t:
https://developer.spotify.com/documentat...tials-flow
Code:
local headers_token = {
['Authorization'] = "Basic "..Id_Psw_Encode64,
}
function Data_Pedir_Token ()
url = "https://accounts.spotify.com/api/token"
data = json.encode({
['grant_type'] = "client_credentials",
})
--log(data,url)
return data, url
end
function Comando_token (data,url)
headers = headers_token
url = url
res, err = dorequestPostSpoty(url, headers,"POST", data)
log(res,err)
resjson = json.decode(res)
if resjson[1] == nil then
return nil
end
return resjson
end
function PedirToken ()
local data,url = Data_Pedir_Token ()
Comando_token(data,url)
end
PedirToken ()
If I get token manualy it works perfectly