How to use ApiKey in Core SDK C#

I could not find an example of how to use ApiKey in C# code.
I am trying something like this:

var client = new Client(new Config
            Environment = EnvironmentSelector.Mainnet, //Why do I need this if I it seems that I have to provide it on the ApiConfig?
            ApiConfig = new Configuration
                //How to properly initialize this object to use the ApiKey?

Can someone help me setting up the api key for c#?

Hey @OhMyCryptos, here’s an example:

    var cfg = new Config()
        Environment = EnvironmentSelector.Mainnet
    cfg.ApiConfig?.DefaultHeaders.Add("x-api-key", "<Add your api key here>");

    Client client = new Client(cfg);
1 Like

You need to access your Immutable Coinsolution as it shows you have caught up the technical glitch on the Immutable server interface which is due to the newly updated version of the SDK.