Issue with title and get latest topics API

Hi,

I am making use of the discourse forum and we have a customised UX for the application. We are making use of the exposed APIs to do the interaction with discourse. The UX doesn’t have the concept of a title followed by content. Basically it needs to post the entered content only. To make it work in discourse style if i am putting some of the initial characters as title and the original content as raw in body, then while getting the latest topics or whenever i get a list of topics i will get only the title, i won’t get the post number-1 which is my actual content. Is there any solution or customisation i can do to get rid of this issue?

1 Like

This is what is returned by the Discourse topic lists. I don’t think the lack of a proper title is what is causing the problem. To get actual post content from a topic list, you need to make two API requests. First make an API request to get the topic list. Then from the topics that are returned, you need to get the topic ids and make a request to /t/<topic_id>.json for each topic. Substitute the id of the topic you want for <topic_id>. This second request will return the first 20 posts in the topic.

3 Likes