C#
.NET SDK
Modern .NET SDK with async/await and dependency injection.
$dotnet add package Appneural.SDK
Async/await throughoutDI container integrationSource link debuggingNullable reference types.NET 8+ compatibleSystem.Text.Json serialization
Code
Get started in minutes.
initialization.cs
using Appneural.SDK;
var client = new AppneuralClient(new AppneuralConfig
{
ApiKey = Environment.GetEnvironmentVariable("APPNEURAL_API_KEY"),
Environment = "production"
});authentication.cs
// API key
var client = new AppneuralClient(new AppneuralConfig
{
ApiKey = Environment.GetEnvironmentVariable("APPNEURAL_API_KEY")
});
// OAuth 2.0
var client = new AppneuralClient(new AppneuralConfig
{
OAuth = new OAuthConfig
{
ClientId = Environment.GetEnvironmentVariable("APPNEURAL_CLIENT_ID"),
ClientSecret = Environment.GetEnvironmentVariable("APPNEURAL_CLIENT_SECRET"),
}
});usage example.cs
var run = await client.Workflows.TriggerAsync(new TriggerRequest
{
WorkflowId = "wf_invoice_audit_01",
Input = new Dictionary<string, object>
{
["documentUrl"] = "https://storage.example.com/invoices/inv_001.pdf",
["validationRules"] = new[] { "vat_matching" }
}
});
Console.WriteLine($"Workflow started: {run.Id}");Configuration
SDK options.
| Option | Type | Description |
|---|---|---|
| ApiKey | string | Your API key |
| Environment | string | production | sandbox |
| Timeout | TimeSpan | Request timeout |
| MaxRetries | int | Max retry attempts |
Best Practices
Recommended patterns.
Use DI for client lifecycle management
Use IAsyncEnumerable for streaming
Implement Polly for advanced retry policies
Enable source link for debugging
Enterprise Intelligence
Get started with .NET SDK.
Modern .NET SDK with async/await and dependency injection.
Scope and availability confirmed individually · Written terms define the engagement