Context: ActivityPub Client-to-Server (AP C2S) is probably the least understood part of ActivityPub and there is very few documentation and running code for it and ActivityPub is mostly underspecified.
This FAQ might be terribly opinionated, I considered pushing it on my own site or https://litepub.social instead but I figured having it more visible and getting easier interactions would be better.
- Created: 2020-07-21
- Last Modified: 2021-07-21
Should I use ActivityPub Client-to-Server?
ActivityPub Client-to-Server is a quite sharp double-edged sword, currently you’ll probably want to use another API like the MastodonAPI.
- Major Pro: You can get one less layer of adaptation and directly get ActivityStreams formatted data
- Major Pro: You can post in more formats/types with AP C2S than with APIs like the MastodonAPI
- Possible Future Pro: AP C2S should allow to gain greater interoperability into clients, not write-once but design-once, continue adjusting (forever)
- Current major Con: AP C2S has yet to be implemented in any server completely enough to be used for things more advanced than bots or minimalist (mobile?) client
- Con: ActivityPub/ActivityStreams/JSON-LD in how they are done have a very high of equally-valid ways to represent one thing, it means software should copy the format of each others for interoperability but it means that variations always happen and you’ll likely need to normalize to an internal format
- Con: ActivityPub is also very under-specified, authentication, permissions and security are almost entirely implementation-defined
- Con: There isn’t a large amount of libraries for working with JSON-LD and very few are actually good, it’s not surprising to see one which breaks when
w3.org
goes down and doesn’t allows to point to a namespace catalog (something very usual in XML), which you might prefer for privacy
ActivityPub Client-to-Server implementations
(will be transformed into examples once there is too much to keep track)
- Pleroma (Server): Moderately Complete, allows HTTP Basic Auth and OAuth, uses ActivityPub in it’s database, which is normalized and validated
- FedBox: (Server) Might be the most complete one, has interesting extensions like filtering
- AndStatus (Client, Android): Complete enough to push Pleroma’s AP C2S forward
- Your own implementation? Comment below.
AP C2S Tools
-
https://hacktivis.me/git/ap-client/, mostly done for something better than just raw
curl
+jq