Skip to main content

Installation

Quick Start

1

Add container element

Add a div where the widget will mount:
2

Import and mount

3

Implement token endpoint

Create a backend endpoint that returns business-scoped tokens:
Security: Never hardcode tokens in frontend codeThe getToken function must call your backend to fetch fresh tokens. This keeps your partner credentials secure and allows proper token rotation.

CDN Usage (No Bundler)

For vanilla JavaScript or server-rendered apps:

Configuration Reference

Required Options

Optional Options

Theme Customization

Match your platform’s visual identity:

Multi-Language Support

Change language dynamically:

Advanced Configuration

Custom Routing

If your app uses routing (e.g., /dashboard/accounting), set basePath:

Hide Navigation Menu

Hide the widget’s header when you want to provide your own navigation:
Combine with menu configuration API to control which tabs appear.

Deep Linking

Navigate directly to specific tabs:

Environment Configuration

Security Checklist

Do: Fetch tokens from your backend endpointDon’t: Generate tokens in frontend code or hardcode credentials
Do: Use business-scoped tokens in frontendDon’t: Expose partner-scoped tokens (grants access to all businesses)
Do: Serve your app over HTTPS in productionDon’t: Use HTTP (tokens will be exposed)
If using CSP, allow:
  • script-src for widget JavaScript
  • connect-src for API calls to https://api.thredfi.com or https://sandbox.thredfi.com
  • frame-src if widget uses iframes internally

Resources


Widget embedded. Time to verify your integration works end-to-end.