A lightweight method for URI addressable resources to be automatically notified about remote (off-site) activites on them.
A crypto-free alternative to the Salmon Protocol for public activites.
- Alice's website aggregates posts from eveyone she follows (via PubSubHubbub).
- Alice visits her website, notices a post by Bob (that he made on his website) and likes it (on her website).
- Alice's website notifies Bob's website about the (like) activity (using ActivityPush).
- Bob's website shows the activity on Bob's activity stream and with his original post.
- Other users following Bob's website are notified about the activity (via PubSubHubbub).
> GET /bob/post/2 HTTP/1.1
> Host: bobs.host
< HTTP/1.1 200 OK
< Link: <http://bobs.host/activitypush-endpoint>; rel="http://activitypush.org/"
< ...
<
< <html>
< ...
< <link href="http://bobs.host/activitypush-endpoint" rel="http://activitypush.org/" />
< ...
> POST /activitypush-endpoint HTTP/1.1
> Host: bobs.host
> Content-Type: application/x-www-url-form-encoded
>
> actor=http://alices.host/alice&\
> activityid=http://alices.host/alice/activity/42&\
> object=http://bobs.host/bob/post/2
< HTTP/1.1 202 Accepted
Note: the "" character is used here to indicate line wrapping in the request content and is not part of the content itself.
bobs.host
should check that the object
of the activity
belongs to it.
> GET /alice HTTP/1.1
> Host: alices.host
< HTTP/1.1 200 OK
< Link: <http://alices.host/activitypush-endpoint>; rel="http://activitypush.org/"
< ...
<
< <html>
< ...
< <link href="http://alices.host/activitypush-endpoint" rel="http://activitypush.org/" />
< ...
> GET /activitypush-endpoint?actor=...&activityid=...&object=... HTTP/1.1
> Host: alices.host
< HTTP/1.1 200 OK
< Content-Type: application/stream+json
<
< {JSON Activity Streams}
bobs.host
should check that the actor
and the object
of the activity
are the same as the one it received in the notification.
ActivityPush is agnostic to how Activities are represented as long as it has an actor
URL, a verb
and an object
URL. For example, instead of the application/stream+json
, 'alices.host` could have returned an HTML representation containing activity microformats or RDFa.
- Pingback
- Trackback
- RESTful Pingback
- Semantic Pingback
- Salmon Protocol
- Dialback Authentication
- PubSubHubbub
- Watch, trust, friend
- Private webhooks, hold the crypto?
Feel free to file an issue if you have feedback/questions/suggestions.