Authenticate

In order to use the API one needs to authenticate first.

All customers for whom the API is enabled can request one or more login accounts. Currently it is possible to use accounts using either JWT authentication or HTTP Basic Authentication.

Using these accounts all services for which the customer is granted access are available.

Other authentication methods will become available in the future.

Using the HTTP Basic Authentication

When applying for additional API access accounts you will receive a username password combination that can be used for HTTP Basic Authentication.

with curl you would use it as:

curl -u '<username>:<password>' https://api.nextpertise.nl/... -d '{...}'

Using JSON Web Token Authentication

When applying for additional API access accounts you will receive a username password combination that can be used for JWT Authentication.

A jwt token is obtained by logging in:

curl -s https://api.nextpertise.nl/jwt/log-in -d '{
    "username": "<your username>",
    "password": "<your password>"
}

This will produce a token which is valid for some time and will reset its timeout whenever it is used in a request.

The token is returned in the HTTP “Authorization” header as required by the jwt standard as well as in the JSON structure returned.

The token is released by calling:

curl -s -X POST -H 'Authorization: Bearer <your token>' https://api.nextpertise.nl/jwt-log-out

The token is used to request access to the API services:

curl -s -H 'Authorization: Bearer <your token>' https://api.nextpertise.nl/<service>/v<version> ...