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.
Please see below the most popular frequently asked questions.
Loading article...
Loading faqs...
Please see below the current ongoing issues which are under investigation.
Loading issue...
Loading ongoing issues...
Even if in the documentation is explicitly mentioned that "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" (see https://developer.spotify.com/documentation/web-api/reference/get-an-artists-top-tracks),
Given a valid user access token is specified,
when no "market" request parameter is provided,
then the get Artist's Top Tracks endpoint is returning error 400 "missing country parameter"
When the "market" request parameter is provided, then the API works fine.
Example of failing call:
curl \
-i \
-X GET \
-H "Authorization: Bearer ${ACCESS_TOKEN}" \
"https://api.spotify.com/v1/artists/${ARTIST_ID}/top-tracks"
Example of successful call:
curl \
-i \
-X GET \
-H "Authorization: Bearer ${ACCESS_TOKEN}" \
"https://api.spotify.com/v1/artists/${ARTIST_ID}/top-tracks?market=IT"
Other endpoints like "Search" (see: https://developer.spotify.com/documentation/web-api/reference/search) are correctly treating the "market" request parameter as optional
I definitely think there is a bug here with user markets. Not the exact same issue, but I'm trying to use the player/currently-playing endpoint, and without specifying any market, I'm getting weird behaviour where I receive the song name, but no `external_url` for it, because the song is available for the user's market, but not elsewhere (like the app's server region).
Just noticed that a similar issue has already been reported in Dec '22 here: https://community.spotify.com/t5/Spotify-for-Developers/Get-Artists-Top-Tracks-Country-is-required/m...
I'm having this issue too
I have the same issue too. For now I solved it by adding the country parameter as such ?country=HN
My request endpoint ⬇️
fetch(
'https://api.spotify.com/v1/artists/53XhwfbYqKCa1cC15pYq2q/top-tracks?country=HN'
{
headers: { Authorization: 'Bearer Z4ga...9lk' }
}
)
When using Client Credentials, you'll need to specify the market. Else, you should use a Authorization Code flow.
Yes, currently I'm using the Authorization Code method, and with this method I have the issue.
I don't see you using the authentication token in your code snipped.
My bad, I fixed it.
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…