8
submitted 4 months ago* (last edited 4 months ago) by UlrikHD@programming.dev to c/lemmy_support@lemmy.ml

Sorry if this is the wrong community, not sure where else to post the question, and I'd rather avoid creating an issue over on Github.

Is there a way to check if a federated user is an administrator via the API? .get_person_details() will have the admin field set to false for all other than local admins and .get_community() only reveals the list of moderators.

I know I could scrape the admin list from the main page html, but scraping html is prone to errors if an instance uses an alternative frontend or the frontend is updated. Getting the data via the API should be a more stable solution.

Based on #3703 it seems like a decent chance that this information isn't currently exposed to federated instances though?

you are viewing a single comment's thread
view the rest of the comments
[-] nmtake@lemm.ee 3 points 4 months ago

Not a direct solution but GET /api/v3/site may help.

[-] UlrikHD@programming.dev 3 points 4 months ago

That should actually work great, in the absence of being part of the API, thanks! Funnily enough the copilot autocomplete suggested that when I was formatting the url param.

this post was submitted on 13 Jul 2024
8 points (90.0% liked)

Lemmy Support

4662 readers
10 users here now

Support / questions about Lemmy.

Matrix Space: #lemmy-space

founded 5 years ago
MODERATORS