arajdon Hello, I'm trying to get the first post from all discussions with a specific tag. What I've tried is /api/discussions?filter[q] with the tag, but that's not it. Is there any other way?
luceos https://discuss.flarum.org/api/discussions?include=startUser%2ClastUser%2CstartPost%2Ctags&filter%5Bq%5D=+tag%3Asupport translates to; /api/discussions?filter[q]=+tag:support Taken from discuss.flarum.org (running newer code than beta 6)
abhishek luceos one question? for fetchin tag related discussion we need any user authentication required. Also can we give steps to how to fecth any tag related discussion from api? Thank you
clarkwinkelmann abhishek unless you're fetching posts that guests can't see, you don't need to authenticate. The answer above shows how to use the tag: filter as part of the query. It has not changed in the latest betas. This is also an example vanilla PHP code if it helps: https://discuss.flarum.org/d/11674-vanilla-php-helper-to-load-discussions-from-flarum-api