Quick Start
Get up and running with the Qlik TypeScript SDK in just a few minutes.
Basic Setup
1. Import and Initialize
typescript
import Qlik from 'qlik';
const qlik = new Qlik({
host: 'your-tenant.us.qlikcloud.com', // or your on-premise server
webIntegrationId: 'your-web-integration-id' // Qlik Cloud only
});
2. Authenticate
typescript
try {
await qlik.authenticateToQlik();
console.log('Authentication successful!');
} catch (error) {
console.error('Authentication failed:', error);
}
3. Fetch Your First App
typescript
// Get all available apps
const apps = await qlik.getAppList();
console.log('Available apps:', apps);
// Open a specific app
const app = await qlik.getApp('your-app-id');
Environment-Specific Setup
SaaSQlik Cloud Configuration
Configuration for Qlik Cloud environments
typescript
const qlik = new Qlik({
host: 'your-tenant.us.qlikcloud.com',
webIntegrationId: 'your-web-integration-id',
// Optional: custom authentication settings
identity: 'your-user-identity'
});
Common Patterns
Check Authentication Status
typescript
if (await qlik.isAuthenticated()) {
// User is authenticated, proceed with operations
const spaces = await qlik.getSpaceList();
} else {
// Redirect to authentication
await qlik.authenticateToQlik();
}
Error Handling
typescript
try {
const apps = await qlik.getAppList();
// Process apps
} catch (error) {
if (error.code === 'AUTHENTICATION_REQUIRED') {
await qlik.authenticateToQlik();
// Retry operation
} else {
console.error('Unexpected error:', error);
}
}
Complete Example
Here's a complete example that demonstrates the basic workflow:
typescript
import Qlik from 'qlik';
async function initializeQlik() {
// Initialize the SDK
const qlik = new Qlik({
host: process.env.QLIK_HOST,
webIntegrationId: process.env.QLIK_WEB_INTEGRATION_ID
});
try {
// Authenticate
console.log('Authenticating...');
await qlik.authenticateToQlik();
console.log('✅ Authentication successful');
// Get apps
console.log('Fetching apps...');
const apps = await qlik.getAppList();
console.log(`Found ${apps.length} apps`);
// Open first app
if (apps.length > 0) {
const app = await qlik.getApp(apps[0].id);
console.log(`Opened app: ${apps[0].name}`);
// Get app sheets
const sheets = await app.getSheets();
console.log(`App has ${sheets.length} sheets`);
}
} catch (error) {
console.error('❌ Error:', error.message);
}
}
// Initialize when DOM is ready
initializeQlik();
Next Steps
Learn Configuration
Explore all configuration options for different environments and use cases.
Configuration Guide →Explore Authentication
Deep dive into authentication flows for both Qlik Cloud and Enterprise.
Authentication Guide →See Examples
Real-world implementation examples with React, Vue, and Node.js.
View Examples →API Reference
Complete API documentation with method signatures and parameters.
Browse API →On this page
Overview
Getting Started
Examples