BUG: Get articles by section ID requires locale
HTTP GET call fetching articles by section id fails with the following error unless a query parameter for locale is specified (?locale=en-us)
https://...../api/v2/help_center/sections/xxxx/articles.json
zenpy.lib.exception.APIException: {"error": {"title": "Invalid attribute", "message": "You passed an invalid value for the sort_by attribute. The endpoint must specify a locale in order to sort by titles"}}
-
Hi Ryan
You need to provide the locale to get the articles by section ID, if your help center supports a single language like en-us or en-gb etc then you can pass your locale on API to get the articles your API call would go like below
https://...../api/v2/help_center/en-us/sections/xxxx/articles.json
Thank You
Pulkit
Team Diziana
-
Cross commenting here from Github for visibility:
I do not get this error if authenticated as an agent. Locale is required for end users and anonymous users, but it does not seem to be supported in zenpy yet.
Por favor, entrar para comentar.
2 Comentários