Use discourse_post_id to get single topic data from API

I thought that the discourse_post_id meta data would work in the API to get single post/topic data (using the “Get a single topic” example on the API documentation - Discourse API Documentation). Unfortunately these numbers don’t match. Has anyone figured out a way to do this? I have a loop of three posts that i would like to display certain statistics on, as well on each post page.

I might be answering my own question here, but i think it will work to extract the ID off the end of the discourse_permalink meta entry. I will give it a shot and post back here/close the topic then.

2 Likes