TypeScript/JavaScript SDK for building multi-user connectors that integrate cloud storage platforms such as Google Drive with the Vectorize platform.
The Vectorize Connect SDK enables you to:
- Build applications where multiple users can connect their cloud storage accounts
- Let users select specific files to be processed by Vectorize RAG pipelines
- Manage user authentication and file permissions
- Handle OAuth flows without building the authentication infrastructure yourself
This SDK is designed for developers who want to integrate multiple users' documents into their AI-powered applications using Vectorize's infrastructure.
npm install @vectorize-io/vectorize-connectyarn add @vectorize-io/vectorize-connectpnpm add @vectorize-io/vectorize-connectnpm install @vectorize-io/vectorize-connectimport { createGDriveConnector } from '@vectorize-io/vectorize-connect'; const vectorizeConfig = { organizationId: 'your-org-id', authorization: 'your-api-key' };// Create a connector const connector = await createGDriveConnector({ connectorName: 'My Google Drive Connector', config: vectorizeConfig }); // Add users via OAuth const authUrl = await getGDriveAuthURL({ connectorId: connector.id, redirectUri: 'https://your-app.com/callback', config: vectorizeConfig });For comprehensive guides and examples:
- Multi-User Connectors Overview - Understanding connector types
- Vectorize-Managed OAuth Guide - Quick setup using Vectorize's OAuth
- White-Label OAuth Guide - Using your own OAuth apps
- API Reference - Complete API documentation
- General Guide - SDK concepts and patterns
- TypeScript Definitions - Type definitions
- Environment Setup
- Creating Connectors
- Authentication Flows
- User Management
- Frontend Integration
- Testing
- Uses Vectorize's pre-configured OAuth apps
- No OAuth app setup required
- Fastest way to get started
- Available on Starter plan and above
- Use your own OAuth applications
- Full control over branding and authentication flow
- Required for production applications with custom branding
- Available on Pro plan and above
- Handle complex OAuth flows for Google Drive, Dropbox, and Notion
- Support for both Vectorize-managed and white-label OAuth approaches
- Automatic token management and refresh
- Interactive file picker UI components
- Granular file and folder selection
- Support for file type filtering
- Add multiple users to a single connector
- Update user file selections
- Remove users and their associated data
- Create and configure connectors programmatically
- Monitor connector status
- Handle connector lifecycle
import { createGDriveConnector, getGDriveAuthURL, selectGDriveFiles } from '@vectorize-io/vectorize-connect'; // 1. Create a connector for your team const connector = await createGDriveConnector({ connectorName: 'Team Knowledge Base', config: { organizationId: process.env.VECTORIZE_ORG_ID, authorization: process.env.VECTORIZE_API_KEY } }); // 2. Each team member authorizes access app.get('/connect-drive', async (req, res) => { const authUrl = await getGDriveAuthURL({ connectorId: connector.id, redirectUri: 'https://your-app.com/oauth/callback', config: vectorizeConfig }); res.redirect(authUrl); }); // 3. Let users select which files to include app.post('/select-files', async (req, res) => { await selectGDriveFiles({ connectorId: connector.id, selectedFiles: req.body.files, config: vectorizeConfig }); });- Node.js 16+ or modern browsers
- TypeScript 4.7+ (optional, for TypeScript projects)
- A Vectorize account with API credentials
This project is licensed under the MIT License - see the LICENSE file for details.