Skip to main content

Authentication

To authenticate with the API, use one of the following methods to log in and save the JWT token:


using Microsoft.Extensions.Logging;
using System.Net.Http;
using eConnect.EventsBridge.Sdk;

// Nuget Package: https://www.nuget.org/packages/eConnect.EventsBridgeSdk

// Create a logger factory
var loggerFactory = LoggerFactory.Create(builder => builder.AddConsole());

// Create an HTTP client
var httpClient = new HttpClient();

// Initialize the SDK with authentication
var sdk = await eConnectEventsBridgeSdk.GetSdk(
loggerFactory,
"https://your-domain.com/eventsbridge",
httpClient,
"your_username",
"your_password"
);

// The SDK is now authenticated and ready for use

Replace the placeholders (your-api-url, your_username, your_password) with your actual API details.