You can allow your user to select files from their OneDrive account in your app with the OneDrive File Picker provided by the Paragon SDK.Showing the File PickerUse the Paragon SDK in your frontend application to show the File Picker in your app.The SDK provides an ExternalFilePicker class to load OneDrive’s JavaScript into your page and authenticate with your user’s connected OneDrive account.
Copy
Ask AI
let picker = new paragon.ExternalFilePicker("onedrive", { onFileSelect: (files) => { // Handle file selection }});// Loads external dependencies and user's access tokenawait picker.init();// Open the File Pickerpicker.open();
You can configure the File Picker to listen for additional callbacks or to restrict allowed file types. Learn more about configuring File Picker options in the SDK Reference.