Type in your question below and we'll check to see what answers we can find...
Loading article...
Submitting...
If you couldn't find any answers in the previous step then we need to post your question in the community and wait for someone to respond. You'll be notified when that happens.
Simply add some detail to your question and refine the title if needed, choose the relevant category, then post.
Before we can post your question we need you to quickly make an account (or sign in if you already have one).
Don't worry - it's quick and painless! Just click below, and once you're logged in we'll bring you right back here and post your question. We'll remember what you've already typed in so you won't have to do it again.
Hi, i was looking a little into the api, especifically to the endpoint
https://api.spotify.com/v1/artists/{id}/albums |
In this example
If I don't use the market parameter it returns what looks to be the same album twice (She's Fire by G-Easy). On closer inspection I see that the available_markets are diferent, one album having only "IN" and the other one having all other markets.
But if I use the market param on the call the result is the same. The only difference is that the field available_markets doesn't come on the object.
Shouldn't the result be different if I use this param? For example if I use "IN" on the previous example it should return the song that only had "IN" as available market and if I use any other market it should return the other one.
Is this the intended use of this param?
Got the same issue. Even worse thing is that the albums I get when passing "market" parameter are not actually available in given region so any playback fails.
Like you said, passing "market" parameter causes the albums to have empty "available_markets" value
The documentation states this:
An ISO 3166-1 alpha-2 country code. If a country code is specified, only content that is available in that market will be returned. If a valid user access token is specified in the request header, the country associated with the user account will take priority over this parameter.
So, if you pass an access token, it will use the country associated with that user, which will override this parameter.
However, if you try to run this without an access token, it says "No token provided". So if it's not possible to run this without an access token, I don't see how it can ever use this parameter.
rsouthward,
You have to use Client Credentials if you don't want to use authorization with this endpoint. Or do you already use it?
Thanks @Ximzend, I didn't realise you could make 'anonymous' calls with the Client Credentials, this now makes sense, although there still seems to be some inconsistency with the markets parameter. I'd have thought that using the `Client Credentials` would list the valid markets for the song, but it seems to return an empty array, which doesn't really let me see which markets the song/album applies to.
Hey there you, Yeah, you! 😁 Welcome - we're glad you joined the Spotify Community! While you here, let's have a fun game and get…