Addendum: What's a Webfinger?

Following an interesting discussion on programming.dev after the last article, I thought it would be good to add some extra notes regarding Webfinger.

Webfinger provides a standard API for discovering the user profile details and avatar from the username, no matter the software running on the node. The standard Webfinger endpoint is /.well-known/webfinger. It must always be queried with at least the resource.

Some examples using my account on Lemmy (programming.dev) and Mastodon (hachyderm.io):

1
$ curl https://programming.dev/.well-known/webfinger\?resource\=acct:ishanpage@programming.dev | jq
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
{
  "subject": "acct:ishanpage@programming.dev",
  "links": [
    {
      "rel": "http://webfinger.net/rel/profile-page",
      "type": "text/html",
      "href": "https://programming.dev/u/ishanpage"
    },
    {
      "rel": "self",
      "type": "application/activity+json",
      "href": "https://programming.dev/u/ishanpage",
      "properties": {
        "https://www.w3.org/ns/activitystreams#type": "Person"
      }
    }
  ]
}
1
curl https://hachyderm.io/.well-known/webfinger\?resource\=acct:ishands@hachyderm.io | jq
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{
  "subject": "acct:ishands@hachyderm.io",
  "aliases": [
    "https://hachyderm.io/@ishands",
    "https://hachyderm.io/users/ishands"
  ],
  "links": [
    {
      "rel": "http://webfinger.net/rel/profile-page",
      "type": "text/html",
      "href": "https://hachyderm.io/@ishands"
    },
    {
      "rel": "self",
      "type": "application/activity+json",
      "href": "https://hachyderm.io/users/ishands"
    },
    {
      "rel": "http://ostatus.org/schema/1.0/subscribe",
      "template": "https://hachyderm.io/authorize_interaction?uri={uri}"
    }
  ]
}

While I’m not sure exactly how this is useful, my assumption is that it’s useful during federation, and for generic activitypub clients because different Fediverse software maps usernames and profiles differently.

Read Next

I’m running an experiment for better content recommendations. These are the 3 posts that are most likely to be interesting for you:

All content is licensed under CC BY-NC-SA 4.0. Copying is an act of love - please copy!
More cool websites: Prev | Hotline Webring | Next
Built with Hugo
Theme Stack designed by Jimmy