M

Mercure Hub HTTP interface

REST discovered

Details
URL
https://<your-hub-domain>/.well-known/mercure
Docs
https://mercure.rocks/spec
Authentication
Mercure hub JWT for publisher/subscriber authorization jwt discovered
Authorization: Bearer <credential> /Cookie: <credential>

For a self-hosted hub, generate your own shared secret or key pair and configure it in the hub with publisher_jwt / subscriber_jwt or the MERCURE_PUBLISHER_JWT_KEY / MERCURE_SUBSCRIBER_JWT_KEY settings described in Hub configuration. Then mint JWTs for publishers and/or subscribers signed with that configured key; publisher tokens must carry a mercure.publish claim and subscriber tokens for private updates must carry mercure.subscribe, as shown in Getting Started and Troubleshooting. For Mercure Cloud, buy a hub via Pricing and configure the same JWT settings from the cloud administration interface described in Mercure Cloud.