Allow all users to see users post_count when using the API

Hey.

I was wondering if there’s any way to allow all users to see users post_count when using the API call /users/{username}.json without having to modify the git repo?

Is there something like a setting or plugin for this?

You can retreive it from https://meta.discourse.org/u/Wille.json under

"post_count":0

Your topic count is 1.

2 Likes

Sure, that works when looking up the profile of ones own user, but I would like the post_count to be public to everyone, preferably even to anonymous browsers.
If I look up https://meta.discourse.org/u/Codinghorror.json there’s no post_count there, just the same as with https://meta.discourse.org/users/Codinghorror.json

1 Like

Bump, not just for seeing post_count but being able to configure the API. Possible?
Edit: Never mind, may have found it under Settings -> User -> public user custom fields
Edit2: Never mind the never mind, adding ‘post_count’ there didn’t help. Is there some kind of syntax here like user@user_fields@post_count ?
Edit3: Doesn’t seem to work with custom created fields either. I added “Discord ID” both in Customize -> User Fields and Settings -> User -> public user custom fields, doesn’t show up even in my (admin’s) own json /users/admin.json when logged in as admin.

1 Like

It’s in https://meta.discourse.org/u/wille/summary.json

image

4 Likes

Appreciate it a lot!

Is there any rhyme or reason to the API so I know where to look next time for something in the future?
I can’t find any mentions of summary.json in the API docs for instance.

2 Likes

This topic might help: How to reverse engineer the Discourse API - developers - Discourse Meta

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.