Announcements

Help Wizard

Step 1

NEXT STEP

Getting Bad Request while saving a specific track

Solved!

Getting Bad Request while saving a specific track

Hi!

We are getting an HTTP 400 and "Bad request" response while sending this track ID to save to the user collection: "5tz69p7tJuGPeMGwNTxYuV". It seems happening with a few other track IDs too like this one "6ilWjJAvXy4dnfwBEDetFF".

 

The response: "error" : {
"status" : 400,
"message" : "Bad request."
}

 

And here is the API method: https://developer.spotify.com/documentation/web-api/reference/#/operations/save-tracks-user

 

And no issue with 90% of any other track IDs...

 

Any idea why?

Reply

Accepted Solutions
Marked as solution

The /me/tracks and /me/albums endpoints seem to have stopped accepting IDs in the body.

It should work if you add them to the query string instead. I just tested your IDs and it worked (got 1-800 and All Falls Down in my library).

Essentially, try the endpoint like this "/me/tracks?ids=5tz69p7tJuGPeMGwNTxYuV"

View solution in original post

3 Replies
Marked as solution

The /me/tracks and /me/albums endpoints seem to have stopped accepting IDs in the body.

It should work if you add them to the query string instead. I just tested your IDs and it worked (got 1-800 and All Falls Down in my library).

Essentially, try the endpoint like this "/me/tracks?ids=5tz69p7tJuGPeMGwNTxYuV"

I analysed your query and found a relevant solution to it. Few weeks back I also faced the same issue for my Atlanta project.  Go to below link

https://stackoverflow.com/questions/67595712/how-to-fix-error-status-400-message-bad-search-type-fie...

Yes, it seems to be that; thank you so much for your help!

Suggested posts