Closed Klairm closed 1 year ago
Yes, you have to authorize. But the Client Credentials Flow is enough for this case https://github.com/rinukkusu/spotify-dart#client-credentials-flow
Yes, you have to authorize. But the Client Credentials Flow is enough for this case https://github.com/rinukkusu/spotify-dart#client-credentials-flow
I see, but how would I use those instances to pass a token in the GET request?
Like, in official spotify docs they return the images in the GET request for tracks https://developer.spotify.com/documentation/web-api/reference/#/operations/get-track
The problem is that spotify-dart doesn't returns the images, and I should use the href sending a token to get it instead
Hm not sure if I understood you correctly. The example you have in your screenshot is returning me the images in the response.
But like mentioned before, you have to provide the token for the GET request. This doesnt work with the basic GET request from the browser. I used Postman in the screenshot, but the library here is taking care of this Authorization handling also.
Hm not sure if I understood you correctly. The example you have in your screenshot is returning me the images in the response.
But like mentioned before, you have to provide the token for the GET request. This doesnt work with the basic GET request from the browser. I used Postman in the screenshot, but the library here is taking care of this Authorization handling also.
Yes, i tried with curl providing a token, but the thing is, shouldn't I be able to do it without token? just with the normal credentials?
Any ideas?
Well, to use the API and get information about a track you need to provide some sort of authentication. This works with a token you receive from the authorization flow where you authorize your App to login, but also with the generated token pair from your Spotify Developer page.
To access the album/track images you need to use the CDN urls from the images
array, not the one from the href
property. These CDN urls also do NOT need authentication:
Hey, I've seen that the only option I have to get the cover art would be using
href
prop in the track, but when I try to open the link it gives it returns me this:Do I need a token for a simple thing like getting a track cover art?