Svrf API Docs

SvrfClient

SvrfClient

Create a new SvrfClient instance. When creating a new instance, the library will automatically authenticate your Svrf API Key.

Options

Options can be provided as ApiOptions instance to adjust the API client's settings.

Manual Authentication

If you want to postpone the initial authentication request and manually control when the Svrf API Key is authenticated, you can set ApiOptions.IsManualAuthentication property to true. Then call AuthenticateAsync() method of the client instance to authenticate the Svrf API Key.

Authentication Tokens

The library will automatically handle attaching your Authentication Token to your requests' headers and renew expired tokens.

Custom Token Storage

Authentication tokens will be automatically saved in memory. Optionally, you can provide your own custom token storage methods using the ApiOptions.Storage property. Provided storage should implement ITokenStorage interface.

Syntax

using Svrf;
using Svrf.Models;
var options = new ApiOptions { IsManualAuthentication = false };
var svrf = new SvrfClient("your key", options);

Parameters

ParameterTypeDescription
apiKeystringYour Svrf API Key.
optionsApiOptionsAdvanced API client options.
options.IsManualAuthenticationbool?Trigger the authentication of your Svrf API Key manually. Defaults: false.
options.StorageITokenStorageUse custom methods to Get, Set, and Clear the authentication token. If none is provided, the application will use default in-memory storage.