To make Micropub requests, the specification requires a Bearer token. Many current Micropub clients force the user to go through IndieAuth to obtain this, which means you need to have the required authorization and token endpoints set-up before getting started with Micropub.
The file token-provider.php
implements the happy path for the IndieAuth dance resulting in providing the Micropub client with whatever token the user has provided.
raziellight on IRC was trying to get the Micropub client Omnibear to work, and that required him to figure out how to set-up IndieAuth from scratch. I think this is way too big of an investment for getting started with Micropub. It was time to cut out the middle man (or protocol, in this case).
- Put the
token-provider.php
file on a webserver with PHP support. It has to be accessible over HTTP. - Visit the URL for
token-provider.php
in a web browser. - Fill the form with the URL for your Micropub endpoint (this is where clients will end up submitting data to) and the token value (this will be sent as Authorization by clients).
- Submit the form to get the final URL. The final URL can be copied from the browser’s URL field, or from a new form field that shows on the page.
- Use this Magic URL in your Micropub client.
The magic URLs do not work for Micropub clients that use the PHP IndieAuth Client library, like Quill. It treats the magic as invalid.
Both README.md
and token-provider.php
are released under the Free Public Licence 1.0.0.