A .NET SDK for integration with Egnyte API.
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
- .Net Framework 4.5
- Windows Phone 8.1
- Xamarin
You need to create an account to have a domain and generate a key for your application:
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);
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.
You can browse full documentation of Egnyte SDK here: https://developers.egnyte.com/docs.
MIT License