API Authentication

Learn how to authenticate with the AccessQR API

Documentation / API Reference / Authentication

API Authentication

Learn how to authenticate with the AccessQR API

Overview

AccessQR uses JWT (JSON Web Tokens) for API authentication. All API requests must include a valid JWT token in the Authorization header.

Authentication Flow

  1. Obtain credentials (email and password)
  2. Call the login endpoint to get a JWT token
  3. Include the token in subsequent API requests

Login Endpoint

POST /api/v1/auth/login

Authenticate a user and receive an access token.

Request Body

{
    "email": "string",
    "password": "string"
}

Response

{
    "token": "string",
    "user": {
        "id": "string",
        "email": "string",
        "name": "string"
    }
}

Using the Token

Include the JWT token in the Authorization header of your requests:

Authorization: Bearer your.jwt.token

Token Expiration

JWT tokens expire after 24 hours. You can refresh your token using the refresh endpoint:

POST /api/v1/auth/refresh

Request Body

{
    "refreshToken": "string"
}