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/GET api/logon/getauthenticationtoken?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: