Authenticate

Before any other call can be made to PublicAPI, the authentication header need to be retrieved. No headers are required for this http-call:

POST api/logon/TakeAuthenticationToken?email=apiuser@nilex.se&password=******

Response JSON:

{

    "Result": {

        "Token": "*******************************",

        "IsError": false,

        "AuthResultMessage": null,

        "Expires": "2059-08-01T15:18:14.8358506Z"

    },

    "Success": true,

    "Error": null,

    "UnauthorizedRequest": false

}

 

This response data need to be kept, and the value of “Token” needs to be put in header “Authentication” with text Bearer on beginning and space and Token value in other calls. When “Expires” has expired a new authentication for a fresh token need to be made.

Example:

 

If you want to log in to the system via API Key, you need to log in to the application and create a new API key with the user. Read more: Api keys

 

After that, a value must be sent in the request header

 

header key:

x-api-key

value is value from api key