this post was submitted on 24 Nov 2023
19 points (95.2% liked)

Fediverse

17734 readers
33 users here now

A community dedicated to fediverse news and discussion.

Fediverse is a portmanteau of "federation" and "universe".

Getting started on Fediverse;

founded 5 years ago
MODERATORS
 

While working on Fedimojis, I'd like to check that the link entered by the user is actually a Mastodon server, to avoid bugs or loading thousands of emojis from Pixelfed instances that don't distinguish between local and external emojis.

How can I do this?

top 3 comments
sorted by: hot top controversial new old
[–] maddy@lemmy.blahaj.zone 6 points 1 year ago* (last edited 1 year ago) (1 children)

Most software responds to /.well-known/nodeinfo with this info iirc

[–] retiolus@lemmy.cat 7 points 1 year ago

Okay! So you first need to check /.well-known/nodeinfo to get /nodeinfo/2.0.json!

In the case of Pixelfed it's in /api/nodeinfo/2.0.json

[–] aliceif@mkultra.x27.one 5 points 1 year ago

@retiolus@lemmy.cat pretty much all software should be implementing nodeinfo: https://github.com/jhass/nodeinfo
usually reachable via HTTP on an endpoint like url/nodeinfo/2.0.json