Skip to content

Bob follows Alice

given: "alice" created an actor on "abel" called "alice" with username "alice"

send.alice.request.create_actor
{
  "base_url": "http://abel",
  "preferred_username": "alice",
  "profile": {},
  "automatically_accept_followers": null,
  "name": null
}
receive.alice.response.create_actor
{
  "attachment": null,
  "published": "2026-03-20T15:22:07.405710",
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    "https://w3id.org/security/v1",
    {
      "manuallyApprovesFollowers": "as:manuallyApprovesFollowers"
    }
  ],
  "publicKey": {
    "id": "http://abel/actor/SfZ0WmqRQNuaGEfjvBDWbw#legacy-key-1",
    "owner": "http://abel/actor/SfZ0WmqRQNuaGEfjvBDWbw",
    "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxVJx8QgtOYCXFtour658\n4AL3bnbyvES/kRzJjSkSuFtywy+Ji8XUopY2nptN/FDzwn+5rdN3309AQ8WnV0Rp\n2Ddj+gxAM8Nit4KRAKj+pfWJYFZPV2Qb/+nCSrMnWRsCb+CGNaj8kLKg7Y2xZ8Qn\nMwWDhHSFHtrvUhMwpA8U844h2aAHTvCo/Gh3ZzXz1a7viZOHAwL44z7Zjq2FlAg3\nftXGX2tMtKN2+z3peobt6t9m49rQZH1YZHB/Cj1g+T1VgWBzqxzDen+RzxPXnOor\nLfon7ZO7Qfu0t+Qvzsbk3V7BRYr0a5Cd8/v2tRo+sRpttIhjwbFZiX1Zh+m8KRKb\nFQIDAQAB\n-----END PUBLIC KEY-----\n"
  },
  "id": "http://abel/actor/SfZ0WmqRQNuaGEfjvBDWbw",
  "type": "Person",
  "inbox": "http://abel/inbox/uubZsDGR8LkKe8uu5Ojutw",
  "outbox": "http://abel/actor/SfZ0WmqRQNuaGEfjvBDWbw/outbox",
  "followers": "http://abel/actor/SfZ0WmqRQNuaGEfjvBDWbw/followers",
  "following": "http://abel/actor/SfZ0WmqRQNuaGEfjvBDWbw/following",
  "preferredUsername": "alice",
  "name": "alice",
  "identifiers": [
    "acct:alice@abel",
    "http://abel/actor/SfZ0WmqRQNuaGEfjvBDWbw"
  ],
  "endpoints": {
    "sharedInbox": "http://abel/shared_inbox"
  },
  "manuallyApprovesFollowers": true
}

given: "bob" created an actor on "abel" called "bob" with username "bob"

send.bob.request.create_actor
{
  "base_url": "http://abel",
  "preferred_username": "bob",
  "profile": {},
  "automatically_accept_followers": null,
  "name": null
}
receive.bob.response.create_actor
{
  "attachment": null,
  "published": "2026-03-20T15:22:08.112880",
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    "https://w3id.org/security/v1",
    {
      "manuallyApprovesFollowers": "as:manuallyApprovesFollowers"
    }
  ],
  "publicKey": {
    "id": "http://abel/actor/u5i8ahdlrSf2gXdleAtKpQ#legacy-key-1",
    "owner": "http://abel/actor/u5i8ahdlrSf2gXdleAtKpQ",
    "publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAhdwxeGjWm0ej8rmEQeGt\nBpX2OVNO0qjKsTsd5oLIs0rvG0LCG+ircYyHE8D/5nyQl5UvWy5hplrQriHBho19\n09/6eYqRnmmae+lrC4n4ankLzhKEh8yki9HkgsqbHbTVql1tCDX5tJpF1HQ3RVkw\nyV3tOM2wtg2cfNeIPqFWu5dhEsvUuQa8XEg2G1n54HtlLkube9T3W9W5xe8A05iH\nrZQT27N0oaNxk2ePxAn+YZ9aTWw49f8Krc5ggFcGJj25H9gMdL8J/NW7kNtw4FOD\n3Ep8aA7xgQSsBKmUeTWmuutPT8AAeaGlCoG3Bb83CuMdk/00iOPBSW0bjtsSEAwV\niwIDAQAB\n-----END PUBLIC KEY-----\n"
  },
  "id": "http://abel/actor/u5i8ahdlrSf2gXdleAtKpQ",
  "type": "Person",
  "inbox": "http://abel/inbox/J17NW1P5UAhqeuPRSX8xPw",
  "outbox": "http://abel/actor/u5i8ahdlrSf2gXdleAtKpQ/outbox",
  "followers": "http://abel/actor/u5i8ahdlrSf2gXdleAtKpQ/followers",
  "following": "http://abel/actor/u5i8ahdlrSf2gXdleAtKpQ/following",
  "preferredUsername": "bob",
  "name": "bob",
  "identifiers": [
    "acct:bob@abel",
    "http://abel/actor/u5i8ahdlrSf2gXdleAtKpQ"
  ],
  "endpoints": {
    "sharedInbox": "http://abel/shared_inbox"
  },
  "manuallyApprovesFollowers": true
}

when: "bob" sends "alice" a Follow Activity

send.bob.trigger.send_message
{
  "actor": "http://abel/actor/u5i8ahdlrSf2gXdleAtKpQ",
  "data": {
    "@context": "https://www.w3.org/ns/activitystreams",
    "type": "Follow",
    "actor": "http://abel/actor/u5i8ahdlrSf2gXdleAtKpQ",
    "to": [
      "http://abel/actor/SfZ0WmqRQNuaGEfjvBDWbw"
    ],
    "id": "follow:3a6ad0bc-2a92-4de2-ac50-047d50c773ce",
    "published": "2026-03-20T15:22:08Z",
    "object": "http://abel/actor/SfZ0WmqRQNuaGEfjvBDWbw"
  }
}
receive.bob.outgoing.Follow
{
  "data": {
    "raw": {
      "@context": "https://www.w3.org/ns/activitystreams",
      "type": "Follow",
      "actor": "http://abel/actor/u5i8ahdlrSf2gXdleAtKpQ",
      "to": [
        "http://abel/actor/SfZ0WmqRQNuaGEfjvBDWbw"
      ],
      "id": "follow:3a6ad0bc-2a92-4de2-ac50-047d50c773ce",
      "published": "2026-03-20T15:22:08Z",
      "object": "http://abel/actor/SfZ0WmqRQNuaGEfjvBDWbw"
    }
  },
  "actor": "http://abel/actor/u5i8ahdlrSf2gXdleAtKpQ",
  "event_type": "outgoing",
  "history_id": null
}
receive.alice.incoming.Follow
{
  "data": {
    "raw": {
      "@context": "https://www.w3.org/ns/activitystreams",
      "type": "Follow",
      "actor": "http://abel/actor/u5i8ahdlrSf2gXdleAtKpQ",
      "to": [
        "http://abel/actor/SfZ0WmqRQNuaGEfjvBDWbw"
      ],
      "id": "follow:3a6ad0bc-2a92-4de2-ac50-047d50c773ce",
      "published": "2026-03-20T15:22:08Z",
      "object": "http://abel/actor/SfZ0WmqRQNuaGEfjvBDWbw"
    }
  },
  "actor": "http://abel/actor/SfZ0WmqRQNuaGEfjvBDWbw",
  "event_type": "incoming",
  "history_id": null
}

when: "alice" sends an Accept to this Follow Activity

send.alice.trigger.send_message
{
  "actor": "http://abel/actor/SfZ0WmqRQNuaGEfjvBDWbw",
  "data": {
    "@context": "https://www.w3.org/ns/activitystreams",
    "type": "Accept",
    "actor": "http://abel/actor/SfZ0WmqRQNuaGEfjvBDWbw",
    "to": [
      "http://abel/actor/u5i8ahdlrSf2gXdleAtKpQ"
    ],
    "published": "2026-03-20T15:22:08Z",
    "object": "follow:3a6ad0bc-2a92-4de2-ac50-047d50c773ce",
    "id": "accept:208baadf-9ed6-4e89-97a8-30b467ed34df"
  }
}
receive.alice.outgoing.Accept
{
  "data": {
    "raw": {
      "@context": "https://www.w3.org/ns/activitystreams",
      "type": "Accept",
      "actor": "http://abel/actor/SfZ0WmqRQNuaGEfjvBDWbw",
      "to": [
        "http://abel/actor/u5i8ahdlrSf2gXdleAtKpQ"
      ],
      "published": "2026-03-20T15:22:08Z",
      "object": "follow:3a6ad0bc-2a92-4de2-ac50-047d50c773ce",
      "id": "accept:208baadf-9ed6-4e89-97a8-30b467ed34df"
    }
  },
  "actor": "http://abel/actor/SfZ0WmqRQNuaGEfjvBDWbw",
  "event_type": "outgoing",
  "history_id": null
}
receive.bob.incoming.Accept
{
  "data": {
    "raw": {
      "@context": "https://www.w3.org/ns/activitystreams",
      "type": "Accept",
      "actor": "http://abel/actor/SfZ0WmqRQNuaGEfjvBDWbw",
      "to": [
        "http://abel/actor/u5i8ahdlrSf2gXdleAtKpQ"
      ],
      "published": "2026-03-20T15:22:08Z",
      "object": "follow:3a6ad0bc-2a92-4de2-ac50-047d50c773ce",
      "id": "accept:208baadf-9ed6-4e89-97a8-30b467ed34df"
    }
  },
  "actor": "http://abel/actor/u5i8ahdlrSf2gXdleAtKpQ",
  "event_type": "incoming",
  "history_id": null
}

then: The "followers" collection of "alice" contains "bob"

send.alice.request.fetch
{
  "actor": "http://abel/actor/SfZ0WmqRQNuaGEfjvBDWbw",
  "uri": "http://abel/actor/SfZ0WmqRQNuaGEfjvBDWbw/followers"
}
receive.alice.response.fetch
{
  "actor": "http://abel/actor/SfZ0WmqRQNuaGEfjvBDWbw",
  "uri": "http://abel/actor/SfZ0WmqRQNuaGEfjvBDWbw/followers",
  "data": {
    "@context": "https://www.w3.org/ns/activitystreams",
    "type": "OrderedCollection",
    "id": "http://abel/actor/SfZ0WmqRQNuaGEfjvBDWbw/followers",
    "orderedItems": [
      "http://abel/actor/u5i8ahdlrSf2gXdleAtKpQ"
    ],
    "totalItems": 1
  }
}

then: The "following" collection of "bob" contains "alice"

send.bob.request.fetch
{
  "actor": "http://abel/actor/u5i8ahdlrSf2gXdleAtKpQ",
  "uri": "http://abel/actor/u5i8ahdlrSf2gXdleAtKpQ/following"
}
receive.bob.response.fetch
{
  "actor": "http://abel/actor/u5i8ahdlrSf2gXdleAtKpQ",
  "uri": "http://abel/actor/u5i8ahdlrSf2gXdleAtKpQ/following",
  "data": {
    "@context": "https://www.w3.org/ns/activitystreams",
    "type": "OrderedCollection",
    "id": "http://abel/actor/u5i8ahdlrSf2gXdleAtKpQ/following",
    "orderedItems": [
      "http://abel/actor/SfZ0WmqRQNuaGEfjvBDWbw"
    ],
    "totalItems": 1
  }
}