API to get composer settings?

Hello friends,

I am building a mobile forum app using Discourse API and I’d like to implement client-side minimum character enforcement for topics/posts so that we don’t have to fire an API request to validate whether the inputted text content satisfy the requirements.

However it does look like we allow configuring minimum post and first post length dynamically through admin settings.

My question is: is there a way to fetch down all these settings using an API call (in my case, at app startup time) so that the app doesn’t need to hardcode the thresholds and assume they won’t change?

Thanks in advance for taking a look!


1 Like

I found admin/site_settings/category/posting.json but it seems that this is only visible to admin users…

Best I can offer is to Reverse engineer the Discourse API and see if the UX is pulling down the information that you require.

I didn’t see in a quick look, so the next thing I’d do is look in the source of the composer.

And a quick look at max_post_length I don’t see it in a serializer, so I think that the Discourse client probably just posts it to see if it’s too long. And then I tested that, and indeed, the client doesn’t know the max length: