Skip to content

WebFinger for ActivityPub Feed Discovery

The first question I had while reading the ActivityPub specification was, “How do I find the different feeds and documents defined by the spec?”

One of the first things defined would be an actor object that refers to me. An actor object contains my name, avatar, and paths to the different collections.

ActivityPub doesn’t define how to find an actor object for a specific user. Instead, existing networks like Mastodon use a different standard for this purpose, WebFinger.

WebFinger is a pre-defined URL that allows you to look up information about a specific resource. Here is an example of how Mastodon uses it:

If you have a user in Mastodon @andrewshell@indieweb.social, you can request `GET https://indieweb.social/.well-known/webfinger?resource=acct:andrewshell@indieweb.social` and get back a WebFinger document in json:

{
  "subject": "acct:andrewshell@indieweb.social",
  "aliases": [
    "https://indieweb.social/@andrewshell",
    "https://indieweb.social/users/andrewshell"
  ],
  "links": [
    {
      "rel": "http://webfinger.net/rel/profile-page",
      "type": "text/html",
      "href": "https://indieweb.social/@andrewshell"
    },
    {
      "rel": "self",
      "type": "application/activity+json",
      "href": "https://indieweb.social/users/andrewshell"
    },
    {
      "rel": "http://ostatus.org/schema/1.0/subscribe",
      "template": "https://indieweb.social/authorize_interaction?uri={uri}"
    },
    {
      "rel": "http://webfinger.net/rel/avatar",
      "type": "image/png",
      "href": "https://cdn.masto.host/indiewebsocial/accounts/avatars/109/795/026/221/763/182/original/d639e13f753e4656.png"
    }
  ]
}

The link defined with "rel": "self" and "type": "application/activity+json" is the URL for my ActivityPub actor object.

Another link, defined by "rel": "http://webfinger.net/rel/profile-page" is the URL a human should visit for this actor’s profile page.

The last link is something related to oStatus. However, that URL goes to a gambling spam site. The wiki for it is available from the w3c.

Other services can also have links in the WebFinger document. For instance, OpenID Connect uses it.



Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Find out more about Webmentions.)