Working with documents from Notion, Google Drive, and SharePoint can be a chaotic experience. Differences in the API responses, auth flow, and edge cases - and none of them play nicely together. That's why we built the StackOne Unified API for Documents.
It provides a consistent way to fetch, upload, and manage content across knowledge bases and file storage systems, eliminating the usual integration headaches. It's secure, fast, and built to scale with you.
@stackone/file-picker
- a drop‑in React component to browse & select files/folders from connected providers.The @stackone/file-picker
SDK allows you to embed the picker.
# NPM
npm install --save @stackone/file-picker
# Yarn
yarn add @stackone/file-picker
Initialize the picker, then call open()
method. Handle the callbacks to know when files are selected or the flow is cancelled:
import { FilePicker } from '@stackone/file-picker';
export const FilePickerButton = () => {
const [filePicker, setFilePicker] = useState<FilePicker | null> (null);
useEffect(() => {
const initializePicker = async () => {
const { sessionToken } = await retrieveAPISessionToken();
setFilePicker(new FilePicker({ sessionToken }));
};
initializePicker();
}, []);
const handleClick = useCallback(() => {
filePicker?.open();
}, [filePicker]);
return (
<button onClick={handleClick} disabled={!filePicker}>
Open File Picker
</button>
);
};
To find more details about the File Picker component, navigate to the StackOne documentation.
The File Picker accepts multiple options for customization:
const options = {
sessionToken = 'your-session-token',
containerId = 'file-picker-container',
baseUrl = '<https://app.stackone.com>',
fields = ['name', 'path', 'driveId'],
showBranding = false,
folderSelectionEnabled = true,
onFilesPicked = (files) => {
console.log('Selected files:', files);
},
onOpen = () => {
console.log('File picker opened');
},
onClose = () => {
console.log('File picker closed');
},
onCancel = () => {
console.log('File selection canceled');
}
};
The Unified Documents API ships with a clean, consistent set of endpoints - list, upload, and download - so you can work with files, folders, and drives across Notion, Confluence, Google Drive, and SharePoint without adapting for each provider’s quirks. For the complete list of endpoints, parameters, and other technical details, navigate to the API reference documentation.
GET: /unified/documents/files
- list
POST: /unified/documents/files/upload
- upload
GET: /unified/documents/folders
- list
GET: /unified/documents/folders/{id}
- details
GET: /unified/documents/drives
- list
GET: /unified/documents/drives/{id}
- details
Questions or migration help? Reach out - we are happy to pair with your team on the rollout!