Skip to content

Instantly share code, notes, and snippets.

@DaltonWebDev
Created July 4, 2018 16:29
Show Gist options
  • Save DaltonWebDev/774dcba5fd2a615da946312f01e62218 to your computer and use it in GitHub Desktop.
Save DaltonWebDev/774dcba5fd2a615da946312f01e62218 to your computer and use it in GitHub Desktop.

Henlo API

All Henlo functionality is available using our open API. Henlo.XYZ uses all the same APIs that developers have access to. We encourage developers to make their own Henlo clients. Below I'm going to outline all available APIs and how to interact with them. Keep in mind that Henlo is in beta and API changes and downtime might happen at times.

This gist will be updated whenever there's an API update, so don't forget to bookmark this page.

Authentication

The authentication endpoint is used for logins and registrations. The API URL is:

https://henlo.xyz/api/auth.php

This API expects a POST request and 3 parameters:

Parameter Expects
action login or register
username must be 4-20 alphanumeric characters
password self explanatory - developers are not allowed to store this password anywhere. that is explicitly against the developer terms and conditions.

How am I going to keep people authenticated if I'm not allowed to store their password?

Keep reading and I will explain how to interpret the API output.

It is JSON in this format:

{"error": "error string or boolean false","token": "32 character alphanumeric string or null if error isn't false"}

Take note of that token because it's going to be used to make requests to all other APIs that require authentication.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment