Subscription
Overview
The following is an overview for using the WebSub protocol to setup a subscription. It works by sending a POST request to our WebSub hub url (https://hub.mfn.se) with some parameters as Form data. Available parameters are listed below in the API reference.
Required parameters
hub.modeShould be set tosubscribeto setup a new subscription.hub.callbackEndpoint URL that you would like to setup a subscription for.for example
https://site.se/news/mfn-sink/j40sk6kfj43lgkr
hub.topicthe topic to subscribe toFor all news in json format the topic is
/s.jsonFor all news in xml format the topic is
/s.xml
Additional parameters
hub.secretRecommended. A secret provided by you that we will use to HMAC sign the HTTP body of any POST requests sent to your endpoint.
Flow
Client POSTs to our APIs WebSub Hub URL with the required params described above
Our API (the Hub) sends a GET request to the endpoint URL provided (
hub.callback)The request contains a challenge random string as a query param (
hub.challenge)
The endpoint should then echo back the challenge back in the HTTP Body. This verifies the intent of the subscription
The original POST request (1) returns with
202 Accepted
Last updated
Was this helpful?