Skip to content

Authentication ‐ Sign‐In Out

Dean Hristov edited this page Dec 21, 2023 · 3 revisions

This piece of the API allows you to perform the CRUD operations in the context of the SignIn/Out

Endpoints

Auth

This API gives you the ability to authenticate yourself in front of the REST API. It is using a "Bearer" token. An example of a response is:

{
    "status": "success",
    "data": "Bearer token"
}

Sign In

POST /api/v1/auth/sign-in

Parameters

Name Type In Required Description
email string body Yes The email address of the user
password string body Yes The password address of the user

Example response:

{
    "status": "success",
    "data": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI0ODM0OGY3NC0xM2RkLTRkNGUtYjYzOS02YzJmMDJiZjQ4NTQiLCJpYXQiOjE2OTI4MTMzNzEsImV4cCI6MTY5NjQxMzM3MX0.JwxpEIzKnQY7yQbwIminy1fmLPgG8nBLYkYteldvdFU"
}

Status codes

Status code Description
200 OK Indicates a successful response.
400 Bad Request Indicates that the parameters provided are invalid.

Sign out

GET /api/v1/auth/sign-out

Example response:

{
    "status": "ok",
    "data": {
        "sign-out": true
    }
}

Status codes

Status code Description
200 OK Indicates a successful response.
Clone this wiki locally