Authentication

Authenticating users is a key part to managing user accounts - This documentation will explain how. It will cover 2 different methods that are available via AccountableAPI.

Authenticate token

POST https://accountable.pixelninja.dev/:token/user/:uuid/authenticate/token

This will allow you to check if the provided token is valid for the user who you provide. You can use this 10 times per second.

Path Parameters

Name
Type
Description

token

string

This is your API token.

uuid

string

This is the UUID of the user who is suspected of owning the token.

Request Body

Name
Type
Description

token

string

This is the user token you are checking.

{ "code": 200, "message": "OK" }

The first part of a user token (before the first ".") is a base64 encoded UUID of the user that the token belongs to.

If you do not provide a token, then the token for the user of which you have specified the UUID will be sent instead.

Authenticate Via User Credentials

POST https://accountable.pixelninja.dev/:token/users/authenticate

This will take a username and password argument - returning information about the credentials if valid. You can use this endpoint 10 times per second.

Path Parameters

Name
Type
Description

token

string

This is your API token.

Request Body

Name
Type
Description

username

string

The username of the user who is authenticating.

password

string

The password of the user who is authenticating.

{
    "uuid": "d4b4e3d7-c081-4937-ae96-0ec140111f5b",
    "2fa": false
}

The username is checked in lowercase.

Last updated

Was this helpful?