Environments

TEST environment

PRODUCTION environment:

Authentication endpoint

API Endpoint: POST /api/auth/

Description:

This endpoint allows you to authenticate with the backend system. Authentication is required to access additional functionalities. Upon successful authentication, you will receive an access token and a refresh token. The access token grants you permission to use other endpoints.

Note: We currently do not use the refresh token.

Example:

curl 
    --request POST
    --url <https://dashboard.smapplab.com/api/auth/>
    --data '{
        "username": "clientusername",
        "password": "clientpassword"
    }'

Request body:

{
    "username": "clientusername", // username or email
    "password": "clientpassword" // paswword
}

Example response:

{
    "refresh": "exampleaccesstoken", // Not in use yet
    "access": "examplerefreshtoken" // Can be used until it is expire (5h)
}