Authentication
The Poli Page .NET SDK authenticates every request with a bearer token. The key prefix determines which environment the request hits.
API keys
Section titled “API keys”Pass the key to the client through PoliPageClientOptions:
var client = new PoliPageClient(new PoliPageClientOptions{ ApiKey = Environment.GetEnvironmentVariable("POLI_PAGE_API_KEY")!,});The SDK never reads POLI_PAGE_API_KEY implicitly — you always pass the key in through ApiKey. Passing a null, empty, or whitespace value throws ArgumentException from the PoliPageClient constructor.
Example
Section titled “Example”using PoliPage;
var client = new PoliPageClient(new PoliPageClientOptions{ ApiKey = Environment.GetEnvironmentVariable("POLI_PAGE_API_KEY")!,});