Making our Activity Pub endpoints

we are currently trying add ActivityPub endpoints to our activityStream filled api
is there a clear tutorial or step by step approach ?
we got the mastodon api working fine in web client it’s not activityStream content so we are starting again to try and access the AP part of the Mastodon API
unfortunetly everything we are doing listed in the How to implement a basic ActivityPub server - Official Mastodon Blog is not so clear

we are trying to test first with a REST client or curl to see responses from the api
in order to reproduce everything

but we’re stuck on the starting line
please help us bootstrap
any tutorial, endpoint list or REST api listings would be great
JS implementation , anything … :slight_smile:


Hi oceatoon!

The page you link is designed as a tutorial. If some parts of it seem unclear, feel free to let me know and I can help clarify them.

The first line of How to implement a basic ActivityPub server - Official Mastodon Blog is openssl genrsa -out private.pem 2048. Are you having a problem with that command for some reason? If not, which line are you having a problem with?

I’m not sure what you mean here. You will need a static or dynamic server to start with, since activitypub requires that your documents be publicly resolvable. This is why the guide makes references several times to uploading the JSON documents to your webhost.

The endpoints you need for a bare minimum activitypub server-to-server implementation are:

  • an actor (an activity+json document specifying a user)
  • an inbox (accepts POST requests that represent activities)

To send messages to other people, you POST activities to their inbox, generally using HTTP signatures.

You will need one additional endpoint if you plan on federating with mastodon:

  • /.well-known/webfinger (provides a mapping from textual @username@domain.tld accounts to the actor endpoint)

Here is an example JS implementation you can take a look at:

Thanks a lot it put on new tracks
it always good to remix thoughts, to get ideas on track
Thanks best regards