Announcements

Help Wizard

Step 1

NEXT STEP

FAQs

Please see below the most popular frequently asked questions.

Loading article...

Loading faqs...

VIEW ALL

Ongoing Issues

Please see below the current ongoing issues which are under investigation.

Loading issue...

Loading ongoing issues...

VIEW ALL

preview_url doesn't give an url anymore

preview_url doesn't give an url anymore

Hello, I'm writing an app (at the moment is just sperimental) which uses the preview_url given by this API endpoint

 

https://api.spotify.com/v1/tracks/


This is my workflow, summed up in a few line:

 

1. Creating my client creds using Client_Id and Client_Secret, both given by Spotify

//this is written in dart

String clientCreds=clientId+":"+clientSecret;
var clientCredsEncoded = utf8.encode(clientCreds);
String clientCredsB64 = base64Encode(clientCredsEncoded);

2. Retriving my token using api/token endpoint

http.Response risposta = await http.post(
url,
headers: {"Authorization": "Basic " + creds},
body: params
);


3. Getting a track info using v1/tracks endpoint

 

(I get a random track from this playlist)

)


And it worked since yesterday. Some songs didn't have the preview_url but just a few, most of the song had it. Today it doesn't work anymore, every song has the preview_url = null. I can get every info of a track, like the image, the title, the artist, but the preview_url is equal to null, in every songs. I don't know if it is a problem linked to my account, some sort of limitation (I registered the app with another account with a free plan), but I can't figure it out

Reply
20 Replies

I'm having the same issue as well, and I'd really like users in my application to be able to hear the preview urls when searching for an item. Is there any reason why for the same track that comes back in user top tracks that has a preview url would turn up nil in the search results?  

Suggested posts

Staff
Let's introduce ourselves!

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…

Staff
ModeratorStaff / Moderator/ 3 years ago  in Social & Random

Type a product name