Overview
The FAD SDK must be initialized before you can use any of its modules. Initialization involves creating an instance of theFadSDK class with your authentication token and optional configuration settings.
Basic Initialization
The simplest way to initialize the SDK is by providing your authentication token:For Vanilla JS implementations, remember to specify the script type as
module in your HTML:Initialization with Options
You can customize the SDK behavior by passing an options object as the second parameter:Constructor Parameters
Your FAD SDK authentication token. This token is required to authenticate your application with the FAD services.
Configuration options for the SDK instance.
The FAD environment to connect to. Use
FadSDK.getFadEnvironments() to get available environments.Available environments:UATHA- UAT High Availability environment- Other environments (see Environments for full list)
Complete Initialization Example
Here’s a complete example showing initialization with all recommended practices:SDK Version
You can check the SDK version using the staticversion property:
Cleanup
Always call theend() method when you’re done with the SDK to properly clean up resources:
Installation Methods
- npm
- Direct JS File
Install the SDK via npm:Then import it in your project:
Next Steps
Available Modules
Explore the different modules available in the FAD SDK
Error Handling
Learn how to handle errors and exceptions
Environments
Configure different environments for your SDK
Quick Start
Get started with a complete example