0
Spotify API Request
Hi to all
Has anyone attempted to connect to Spotify through an API Request?
let token := "BQB7FiB1M60v_z...VlaJOMjdE1-I";
let artistId := "0TnOYISbd1XYRBk9myaseg";
let response := http("GET", "https://api.spotify.com/v1/artists/" + artistId + "/albums", {
Authorization: "Bearer " + token,
'Content-Type': "application/json"
});
if response.status_code = 200 then
let albums := response.body.items;
AlbumsID := albums
else
AlbumsID := "Errore nella richiesta: " + response.status_code + ", Risposta: " + response.body
i am getting no response...
thank you for attention
5 replies
-
you need to write "do as server":
let response := do as server http("GET", "https://api.spotify.com/v1/artists/" + artistId + "/albums", { Authorization: "Bearer " + token, 'Content-Type': "application/json" }); if response.status_code = 200 then let albums := response.body.items; end;
Content aside
- 3 wk agoLast active
- 5Replies
- 34Views
-
2
Following