Here’s my use case: I want to show the top 5 latest and hottest topics on my forum home page. I need it to be filtered by what is appropriate for a particular Discourse user - for example, some of my users have access to a private category (which has topics that should bubble up to latest/hottest) and some other users don’t.
Currently when I call the Discourse API to get what I need, I use a system API key. This gives me results that include not only the hidden categories, but also always includes any globally-pinned topics at the top of the list (even though a user may have long unpinned those).
So I think you can see why I need the latest/top for a specific user, not across the entire forum.
And if this functionality is possible by calling with a user API key, then it’s a different problem-- it seems very clumsy to have to create a user API key (programmatically) every time I want to retrieve these results for a user. (And presumably destroy the API key right after, since I don’t need it for anything else.) Is that the only way?
I propose a solution where if you call latest.json or top.json with a system API key, those endpoints could take an optional user ID parameter to limit the results.