Skip to content

BryanEllis/egnyte-dotnet

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Egnyte.NET

A .NET SDK for integration with Egnyte API.

Setup

To get started working with Egnyte .NET SDK, we recommend you to add it to your project using NuGet.

To install Egnyte.Api, run the following command in the Package Manager Console:

PM> Install-Package Egnyte.Api

Supported frameworks

  • .Net Framework 4.5
  • Windows Phone 8.1
  • Xamarin

Creating an application

You need to create an account to have a domain and generate a key for your application:

How to use

Obtaining an access token

In Egnyte.Api all 3 authorization flows are implemented. However, Authorization Code Flow is the most common. To create authorize uri, use OAuthHelper class:

var authorizeUrl = OAuthHelper.GetAuthorizeUri(
    OAuthAuthorizationFlow.Code,
    Domain,
    PrivateKey,
    "https://mywebsite.com/redirectEgnyteResponse");

You will need to redirect user to that url, so he can enter he's credentianls. After getting the response, token can be obtained like this:

var token = await EgnyteClientHelper.GetTokenFromCode(
	Domain,
    PrivateKey,
    Secret,
    "https://mywebsite.com/redirectEgnyteResponse",
	code);

API operations using token

To perform Egnyte API operations, please create EgnyteClient:

var client = new EgnyteClient(Token, Domain);

// lists files and folders in Documents directory
var listing = await client.Files.ListFileOrFolder("Shared/Documents");

For more details, read methods descriptions or documentation.

Documentation

You can browse full documentation of Egnyte SDK here: https://developers.egnyte.com/docs.

License

MIT License

https://opensource.org/licenses/MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%