Announcements

Help Wizard

Step 1

NEXT STEP

get/chapters returns a 500 error if you don't include the market code in the web api

get/chapters returns a 500 error if you don't include the market code in the web api

Plan

Free/Premium

Country

United States

Device

Desktop

Operating System

Windows 10

 

My Question or Issue

I was working on a personal project where I am creating a python library for the Spotify API for learning purposes. I was creating a method for GET /chapters/{id} and GET /chapters and noticed that they returned a 500 error. I ended up adding the market code and it fixed this issue. 

 

A side note, I also noted that the documentation for GET /artists/{id}/top-tracks does not say the market code is required, but excluding it returns a 404 error.

 

Reply
2 Replies

EDIT: It actually returns a 400 error, not 404.

The documentation say: "Note: If neither market or user country are provided, the content is considered unavailable for the client."

So that error is expected behavior.

Suggested posts