Node.js API Client

The API Clients are not shipped with the product setup executable and are managed and maintained in each respective package manager.

This API client can be used with the new inmation Web API server..

Installation

Install with npm install @inmation/inmation-api-client.

See the npm page for more details.

How to use it

inmation credentials only (deprecated)

const options = {
    usr: 'USERNAME',
    pwd: 'PASSWORD'
};

Advanced authorization options

  • authority can be inmation, ad (Active Directory - domain account), machine (local account)

  • username can provided in 'User Principal Name' or 'Down-Level Logon Name'

Optional auth authorization fields:

const options = {
    auth: {
        username: "".
        password: "",
        authority: "inmation | ad | machine",
        grant_type: "password",
        include_claims: ["email", "family_name", "given_name", "middle_name", "phone_number"]
    }
};

include_claims can only be used in combination with authority set to ad. The token will not be returned to client by can be used in ExecFunction implementations.

Note: check Web API version which authorization options its supports.

Example Active Directory authentication:

const options = {
    auth: {
        username: "user@domain.com".
        password: "secret",
        authority: "ad",
        grant_type: "password"
    }
};