Configuration
In order to use Aperture, or any Microsub app, you'll need to sign in using IndieAuth.
If you're running WordPress, you can install the WordPress IndieAuth plugin to quickly add support for IndieAuth to your website. Otherwise, you can check if your CMS supports IndieAuth, or connect your site to an existing IndieAuth service or write your own.
Set up using IndieAuth.com
If your website doesn't already support IndieAuth, the quickest way to get started is to use the hosted indieauth.com service.
Add the two HTML tags below to your home page in the <head>
section:
<link rel="authorization_endpoint" href="https://indieauth.com/auth"> <link rel="token_endpoint" href="https://tokens.indieauth.com/token">
Next, add a link from your home page to your GitHub profile or email address (or both) like the below:
<a rel="me" href="https://github.com/username">github</a> <a rel="me" href="mailto:[email protected]">email</a>
Now you'll be able to sign in to Aperture, or any other IndieAuth app!
API Keys
Adding an API key to a channel will let you use that API key to write posts directly into the channel rather than following an external feed. This is useful if you're writing your own custom integrations, such as adding an entry to a channel every time you receive a Webmention.
Once you have an API key, you can use it like a Micropub access token. Aperture's API accepts Micropub requests to create content in channels.
POST https://aperture.janboddez.tech/micropub Authorization: Bearer (CHANNEL API KEY) Content-type: application/x-www-form-urlencoded h=entry&content=Hello+World
See indieweb.org/Micropub for more details on how to make a Micropub request.
Microsub Client Development
To test API calls, you can generate a token from your token endpoint yourself or by using this access token tool.
Your Microsub endpoint is unique to your account, and you can find it on your dashboard.
Aperture has implemented the following actions in the Microsub spec:
- GET action=timeline - retrieve the list of items in a channel
- POST action=timeline - mark entries as read, or remove an entry from a channel
- POST action=search - search for a new feed to add
- GET action=preview - preview a feed before following it
- GET action=follow - retrieve the list of feeds followed in a channel
- POST action=follow - follow a new feed in a channel
- POST action=unfollow - unfollow a feed in a channel (existing items from that feed are left in the channel, like IRC/Slack)
- GET action=channels - retrieve the list of channels for a user
- POST action=channels - create, update, and delete channels, or set the order of the channels