ASP.NET Web API コントロール
OneDrive Web APIサービスの設定
サービス > クラウド サービス > OneDrive Web APIサービスの設定

To configure OneDrive Web API Service and perform different operations, follow these steps:

  1. Configure Storage Connection String
  2. Register the Cloud Service
  3. Perform Operations

Step 1: Configure Storage Connection String

  1. Register your app on OneDrive. For registering app, see Register your app.
  2. Generate an access token. For detailed information on how to obtain access token, see Supported Authentication flows.
Back to Top

Step 2: Register the Cloud Service

  1. Create a new C1 Web API Application and make sure the following references are added to the application:
    • C1.Web.Api.dll
    • C1.Web.Api.Cloud.dll
    • OneDrive.Api
  2. Register the OneDrive cloud service using the following code:
    Code
    コードのコピー
    app.UseStorageProviders().AddOneDriveStorage("OneDrive", “your one drive AccessToken”);
    
Back to Top

Step 3: Perform Operations

You can choose to perform various operations, such as listing data, uploading, deleting or downloading a file, after registering the cloud service. To understand how to perform these operations, see Perform Operations.

Back to Top