How it works
The File Picker allows users to:- Navigate a hierarchical file tree (folders, pages, blocks)
- Select one or more files or documents
- Return a list of StackOne file objects, which can be used with unified operations such as
GET /unified/documents/files/{id}orPOST /unified/documents/files/{id}/download
Picker types
Output Format
When a user completes selection, the picker returns:fileId corresponds to a StackOne-normalized file object that can be accessed via API:
GET /unified/documents/files/{id}– fetch file metadataPOST /unified/documents/files/{id}/download– retrieve file contents (if supported)
File Object Structure (for Fetch)
When queried individually, a file returns the following structure:- For knowledge bases like Confluence and Notion:
- Files may represent pages or blocks
- Additional metadata like
hasContent,hasChildrenis provided
Developer Integration Example
- Trigger the Picker Use the StackOne SDK, embed directly via the UI component or trigger via the StackOne Dashboard.
-
Receive Selection
The picker will return:
-
Perform Unified Actions
- Fetch metadata:
GET /unified/documents/files/{id} - Download file:
POST /unified/documents/files/{id}/download
- Fetch metadata:
Provider feature table
Developer integration
- Trigger the Picker Use the StackOne SDK, embed directly via the UI component or trigger via the StackOne Dashboard.
-
Receive Selection
The picker will return:
-
Perform Unified Actions
- Fetch metadata:
GET /unified/documents/files/{id} - Download file:
POST /unified/documents/files/{id}/download
- Fetch metadata:
Auth & permissions
- Each provider uses OAuth2 authentication via StackOne’s integration flow
-
File access scopes are handled per provider during authentication
- SharePoint:
Files.Read.All,Sites.Read.All - Google Drive:
https://www.googleapis.com/auth/drive.readonly - Confluence/Notion: Read access to spaces/pages/blocks
- SharePoint:
StackOne File Picker SDK Documentation
The StackOne File Picker SDK enables you to integrate file selection from connected accounts into your application. Below are the installation steps, usage examples, and API details.

Installation
Install the SDK using one of the following package managers:Connect Session Token
The File Picker requires creating a separate connect session token with the Account ID and Provider Key of a connected account.Usage
Below you can find the basic usage of the StackOne File Picker SDK using React:API Reference
File Picker Configuration Options
File Selection Response Format
When users complete their selection, theonFilesPicked callback receives different response formats depending on what was selected:
- Files Only
- Files + Folders
Folder Selection Handling: When
folderSelectionEnabled: true is set, users can select entire folders. The response will include folder IDs in the selection. To retrieve all files within selected folders (including nested subfolders), use the List Files API with the folder_id parameter and nested_files: true option to automatically fetch all nested content.onFilesPicked is typically required for document management use cases. Other callbacks (onOpen, onClose, onCancel, onError) are optional and depend on specific user actions or error conditions.
Picker Output Format
When users complete their selection, the picker returns different formats based on what was selected and configured:- Single File
- Multiple Files
- Limited Fields
- Folders Selected
- Drives Selected
FilePicker Methods
method
Opens the file picker interface.
method
Closes the file picker interface.
Notion File Picker
StackOne’s custom picker for Notion provides a unified interface for browsing and selecting Notion content.User flow
- Land on Workspaces page — The picker opens to a list of workspaces. The General Workspace represents the top-most level of the user’s Notion workspace.
- Search for content — Once inside the General Workspace, users search for a file or folder by name.
- Navigate and select — Users can navigate into folders to select sub-files/folders, or pick the folder/file directly from search results.
Characteristics
- Files and Folders: Only databases and pages are returned as files and folders
- Dual-Role Pages: A page can be both a file and folder depending on whether it has content or child pages/databases
- Column List Traversal: If a page has blocks which are column lists, we traverse these blocks to find child pages and databases and return these as direct children
- Actual Location: A file/folder will show in the actual location it resides in, not where it is linked in other files
- Access Control: The customer must grant access to each page/database they want to appear in the file picker by going to Settings → Connections → Share with integration
Testing
You can test the File Picker directly in the StackOne dashboard to verify it’s working correctly with your connected accounts.Accessing the File Picker test
- Navigate to Accounts in the StackOne dashboard
- Find the linked account you want to test
- Click the ellipsis menu (⋯) on the account row
- Select Test File Picker (or similar option)
- Verify the picker loads correctly
- Test navigation through folders/drives
- Confirm file selection works
- Check that selected files return the expected format
Testing checklist
- File Picker opens successfully
- Navigation works (folders/drives expand and collapse)
- Files are visible and selectable
- Multi-file selection works (if enabled)
- Selected files return correct StackOne unified IDs
- Selected file IDs work with
GET /unified/documents/files/{id} - Error handling works (test with invalid account or expired token)
Common issues
File Picker won't open
File Picker won't open
Possible causes:
- Invalid or expired session token
- Missing or incorrect account ID
- Provider not properly connected
- OAuth redirect URI misconfiguration
- Verify the account is connected and shows a healthy status
- Check that the connect session token was created with the correct
accountIdandproviderparameters - Ensure OAuth redirect URIs are properly configured (see OAuth Proxy Redirect)
- Check browser console for error messages
No files or folders visible
No files or folders visible
Possible causes:
- Insufficient permissions/scopes
- Account authentication expired
- Provider-specific access restrictions
- Verify OAuth scopes are correctly configured:
- SharePoint:
Files.Read.All,Sites.Read.All - Google Drive:
https://www.googleapis.com/auth/drive.readonly - Confluence/Notion: Read access to spaces/pages/blocks
- SharePoint:
- Re-authenticate the account if tokens have expired
- For Notion: Ensure pages/databases are shared with the integration (Settings → Connections → Share with integration)
- Check account status in the dashboard
Picker shows wrong files or structure
Picker shows wrong files or structure
Possible causes:
- Provider-specific navigation differences
- Custom picker behavior for knowledge bases (Confluence/Notion)
- Review provider-specific picker behavior:
- Confluence/Notion: Pages can act as both files and folders
- SharePoint: Requires site selection before drive/folder navigation
- Review the Picker Types and provider notes above
- Verify you’re testing with the correct provider type
Selected files return incorrect IDs
Selected files return incorrect IDs
Possible causes:
- Using provider-specific IDs instead of StackOne unified IDs
- Incorrect field selection in configuration
- Ensure you’re using the
idfield from the picker response (this is the StackOne unified ID) - Use the unified ID with StackOne API endpoints:
GET /unified/documents/files/{id} - Don’t use provider-specific IDs directly with StackOne APIs
- See the Developer Integration output format above
OAuth redirect errors
OAuth redirect errors
Possible causes:
- Redirect URI not configured in provider OAuth app
- Redirect URI mismatch between configuration and actual URL
- Missing redirect URI for File Picker (required for Google Drive, SharePoint, OneDrive)
- For Google Drive: Add File Picker redirect URI to your OAuth app configuration
- For SharePoint/OneDrive: Ensure redirect URI includes File Picker support
- See OAuth Proxy Redirect for detailed setup
- Verify redirect URIs match exactly (including protocol, domain, and path)
Related
OAuth Proxy Redirect
Configure the redirect URIs the picker needs.
Documents Actions
The endpoints behind the files you select.
Error Codes
Documents error codes and troubleshooting.
Connector Guides
Provider setup for SharePoint, Google Drive, OneDrive, and Confluence.