HONK(3)

NAME
honk - API access

DESCRIPTION
In addition to the standard web interface, some functionality is available via the honk HTTP API.

With the exception of login, all requests should contain the following form values.

action
    The desired action. See below.

token
    An authorization token. Alternatively, may be passed in the “Authorization” HTTP header.

The API URL for all actions other than login and logout is /api.

  login
Send a POST request to /dologin with the following form values.

username
    User name.

password
    Pass phrase.

gettoken
    Must be “1”.

This will return a token to be used for future requests. The token is valid for one year.

  logout
Send a request to /logout with the token to be expired.

  honk
The action value should be “honk”. The following values are recognized:

noise
    The contents of the honk in markdown format.

donk
    A file to attach.

donkdesc
    A description for the attached file.

placename
    The name of an associated location.

placeurl
    The url of an associated location.

placelat
    The latitude of an associated location.

placelong
    The longitude of an associated location.

timestart
    The start time of an event.

rid The ActivityPub ID that this honk is in reply to.

Upon success, the honk action will return the URL for the created honk.

  gethonks
The “gethonks” action can be used to query for honks. The following parameters are used.

page
    Should be one of “home” or “atme”.

after
    Only return honks after the specified ID.

wait
    If there are no results, wait this many seconds for something to appear.

The result will be returned as json.

  sendactivity
Send anything. No limits, no error checking.

rcpt
    An actor to deliver the message to to. May be specified more than once. An inbox may be specified directly by prefixing with %.

msg The message. It should be a valid json activity, but yolo.

public
    Set to 1 to use shared inboxes for delivery.

EXAMPLES
Refer to the sample code in the toys directory.

SEE ALSO
vim(3)