Welcome to the Authentication API guide. This section provides detailed information about how to authenticate users using our API. Authentication is a crucial part of any application that requires secure access control.

Overview

The Authentication API allows you to:

  • Register new users
  • Login existing users
  • Generate access tokens
  • Verify access tokens

Getting Started

Before you start, make sure you have:

  • An API key
  • Basic understanding of HTTP requests

Registering a User

To register a new user, send a POST request to /en/api/tutorials/authentication/register with the following JSON body:

{
  "username": "example",
  "password": "password123"
}

Logging In

To log in, send a POST request to /en/api/tutorials/authentication/login with the following JSON body:

{
  "username": "example",
  "password": "password123"
}

You will receive an access token in the response, which you can use to authenticate subsequent requests.

Generating Access Tokens

To generate an access token, send a POST request to /en/api/tutorials/authentication/token with the following JSON body:

{
  "username": "example",
  "password": "password123"
}

Verifying Access Tokens

To verify an access token, send a GET request to /en/api/tutorials/authentication/verify with the token as a query parameter:

/en/api/tutorials/authentication/verify?token=your_access_token

API Endpoints

Here is a list of all available endpoints:

  • /en/api/tutorials/authentication/register
  • /en/api/tutorials/authentication/login
  • /en/api/tutorials/authentication/token
  • /en/api/tutorials/authentication/verify

Resources

For more information, please refer to the following resources:

API Guide