ballerinax/microsoft.onedrive

2.3.0

Overview

Ballerina connector for Microsoft OneDrive connects to the OneDrive file storage API in Microsoft Graph v1.0 via the Ballerina language. The connector allows you to programmatically perform basic drive functionalities such as file upload, download. It also allows you to share files and folders stored on Microsoft OneDrive.

This module supports Microsoft Graph API v1.0 and allows performing functions only on behalf of the currently signed-in user.

Prerequisites

Before using this connector in your Ballerina application, complete the following:

Quickstart

To use the OneDrive connector in your Ballerina application, update the .bal file as follows:

Step 1 - Import connector

Import the ballerinax/microsoft.onedrive module into the Ballerina project.

Copy

Step 2 - Create a new connector instance

To make the connection, use the OAuth2 refresh token grant configuration.

Copy

Step 3 - Invoke connector operation

  1. Create a folder
    To create a folder, use the following code block:
Copy
  1. Use bal run command to compile and run the Ballerina program.

You can find a list of samples here

Other versions

See more...