Authentication

A token is required to make requests/calls to any of the private endpoints (API Endpoints that form part of the Private API Spec on Swagger). In order to obtain a Token a call needs to be made to the authentication endpoint.

http://api.psiberworks.com/restapi/authenticate

Parameters Required

In order to make a successful call to the API Endpoint, the body params requires a JSON object with the following fields:

  • username - the same username used to login to PSIber

  • password - the same password to login to PSIber

  • instance

On completion of a successful call the authentication API will respond with a Bearer Token in the response header. The Bearer token will be needed to be passed as an 'Authorization' Header in any of the Private API calls.

httpRequest.setHeader("Authorization","Bearer xxxxyyyxxx"

The token will only be valid for 24 hours, thereafter a new token will have to be requested.

Authentication using Swagger