A Token is required for accessing the Management APIs and this API creates a Access Token for specified user.

There are 2 options for creating Access Token:

  1. From Management Console
  2. From Management API



1. Create Personal API Access Token from Management Console

The user who logs into the application should go to My Profile screen via Quick Menu to update their information.

The picture below shows the Profile settings:


The fields used for the profile configuration are shown in the table below.

FieldDescription

Username

The user's login name for the application.

Full Name

The user's first and last name.

Email

The user's email address.

Preferred Language

The selected language for the application.

Personal API Access Tokens

This section lists the user's personal API access token information required for accessing the Apinizer Management API.

Clicking the Revoke button for the current token cancels it.


Creating an Personal API Access Token

The Personal API Access Token is used for authentication instead of a password when accessing the Apinizer Management API.

A token can be created through the dialog that appears when the Create API Token button is clicked.

The picture below shows the creating a token dialog:


The fields used for creating a personal API access token are shown in the table below.

FieldDescription

Token Name

The name of the token.
ExpirationThe expiration type for the token is selected.

Expiration Date

If the Expiration field is set to Custom, this field becomes active. A specific date is chosen for the token's expiration.


2.Create Personal API Access Token from Management API

Endpoint: https://<APINIZER_MANAGER_ADDRESS>/apiops/auth/token

HTTP Method: POST

Request Headers:

HeaderValue
Content-Typeapplication/x-www-form-urlencoded
Acceptapplication/json

Request Body: (urlencoded)

ParameterValue
grant_typeclient_credentials
client_idusername of the Apinizer User used for management application login
client_secretpassword of the Apinizer User used for management application login

Response:

StatusStatus CodeDescriptionBodyHeader
Success200

successful operation

{
    "access_token""...."
}

Content-Type: application/json;charset=UTF-8
Error400bad request{
    "error""...",
    "error_description""..."
}
Content-Type: application/json;charset=UTF-8
Error401not authorized for this operation

{
    "error""unauthorized_client",
    "error_description""Bad credentials"
}

Content-Type: application/json;charset=UTF-8
Error500internal error{
    "error""...",
    "error_description""..."
}
Content-Type: application/json;charset=UTF-8