Documentation
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Authentication API

Overview

Authentication API is used to obtain and manage access credentials required to interact with Kona Core Network Server APIs.

This API allows users to:

  • Authenticate using supported login methods
  • Obtain access tokens
  • Refresh expired tokens
  • Validate authentication status

Most API requests require a valid access token obtained through this API.


Typical Use Cases

  • User login
  • Automated API integrations
  • Token renewal for long-running applications

How to get access token and refresh token

Login to the Network Server account:

curl --location 'https://{host}/api/auth/login' 
--header 'Content-Type: text/plain' 
--data-raw '{"username":"user@email.com","password":"password"}'`

If the request is successful, an access token and a refresh token will be recieved in responce body.

Response Body:

  {     
  "token": "your ACCESS_TOKEN",     
  "refreshToken": "your REFRESH_TOKEN" 
  }

  • {host} = Network Server or OAM host
  • {username} = username(your email) from Network Server/OAM account
  • {password} = password from Network Server/OAM account


How to use access token to authorise API calls

To authorise API calls use the following header:

X-Authorization: Bearer <your ACCESS_TOKEN>

How to get new Access Token using Refresh Token

Use refresh token to get new access token and new refresh token:

curl --location 'https://{host}}/api/auth/token' 
--header 'Content-Type: text/plain' 
--data '{"refreshToken":" your REFRESH_TOKEN"}' 

Response Body:

  {     
  "token": "your ACCESS_TOKEN",     
  "refreshToken": "your REFRESH_TOKEN" }

  • {host} = Network Server or OAM host


What is the Time To Live of authentication tokens

  • Access token has TTL 2hours
  • Refresh token has TTL 24hours