Auth Overview
As outlined on the Getting Started page, access tokens are required to access other endpoints. The basics to getting an authorization look like this:
Step 1: Register User (For new User)
Register on POST /users
endpoint with the following JSON payload:
{
"username": "your username",
"password": "your user password",
"fullname": "your full name"
}
Step 2: Login User
Login on POST /authentications
endpoint with your username and password as
JSON payload:
{
"username": "your username",
"password": "your user password"
}
You will get the tokens from the server response:
{
"status": "success",
"data": {
"accessToken": "your access token",
"refreshToken": "your refresh token"
}
}
Use accessToken
to access other endpoints and use refreshToken
to refresh
accessToken
or logout session.