Api.constructor

class Api()

Provides high-level access to the TrustID Cloud.

Arguments
  • baseUrl (string()) – Optional: The URL to the TrustID Cloud endpoint; by default this is https://cloud.trustid.co.uk/vpe.svc/.

  • deviceId (string()) – Optional: A unique identifier that identifies the connecting client device across the same session. By default, this is a randomly generated number.

  • sessionId (string()) – Optional: The unique session identifier that is used to authenticate the connecting client. Usually, a session identifier is obtained during authentication automatically.

  • defaultSuccessHandler (function()) – Optional: A function that is called whenever an operation executes successfully. This can be used to intercept operation result handlers.

  • defaultErrorHandler (function()) – Optional: A function that is called whenever an operation results in an error. This can be used to intercept operation result handlers