# DecisioQ .NET reference client

Requires .NET 8. This source reference deliberately has no third-party dependencies.

Prebuilt source archives are available from the Client Kit:

- `downloads/decisioq-dotnet-client-7.6.3.zip` contains only the reusable client library. Use it when adding DecisioQ to an existing application.
- `downloads/decisioq-dotnet-sample-7.6.3.zip` contains the same client library plus a runnable console application demonstrating authentication, loading a JSON request, calling DecisioQ, and handling the response.

For a first-time integration, download the sample package.

Open `START-HERE-DecisioQ.Sample.sln` in Visual Studio. The solution contains
only the runnable `DecisioQ.Sample` console project, so Visual Studio cannot
mistakenly select the client library as the startup project. The sample compiles
the included client source directly. The separate `DecisioQ.Client` project is
provided for copying or referencing from an existing application.

```powershell
$env:DECISIOQ_CLIENT_ID = "your-client-id"
$env:DECISIOQ_CLIENT_SECRET = "your-client-secret"
dotnet run --project .\DecisioQ.Sample\DecisioQ.Sample.csproj
```

Store credentials in a secret manager or protected environment variables. Never commit them, place them in browser code, or write them to logs. The client obtains and caches the `jwtToken`, refreshes it shortly before expiration, retries authentication once after a 401, and preserves API error response bodies for diagnostics.
