Skip to main content

Get API Key

Overview

Generates a new API key for accessing the API.

URL: api/auth/login

Method : POST

Request Header

{'Content-Type': 'application/json; charset=utf-8'}

Request Body

  {
"tenantName": "string",
"userName": "string",#<Mandatory>
"password": "string",#<Mandatory>
"impersonatedUser": "string",
"clientId": "string", #<Mandatory> Set the value to "browser".
}

Response:

  • Status: 200 OK

  • Body:

       {
    "accesstoken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.....="
    }
  • Header:

       {
    access-control-allow-credentials: true
    access-control-allow-origin: http://<Control Room server>
    access-control-expose-headers: inline-image
    content-length: 481
    content-type: application/json; charset=utf-8
    date: Thu,14 Mar 2024 07:33:22 GMT
    server: Microsoft-IIS/10.0
    vary: Origin
    x-api-protector: [2:3:30:638459984323001006:0]
    }