Getting unauthorized error when calling api's

Hi Team,

I’m using GitHub - EventDay/Infusionsoft.net: A C# Wrapper around the Infusionsoft.com API SDK for calling infusionsoft API , using OAuth() for authentication which is working fine.
{
//LegacyAuth();
OAuth();
}

But getting null API key in below method or when passing the hard coded API key getting unauthorized error.

protected ServiceBase(IInfusionSoftConfiguration configuration, IMethodListenerProvider listenerProvider)
{
MethodListenerProvider = listenerProvider;
Configuration = configuration;
_proxy = new InfusionsoftProxy(configuration, listenerProvider);
ApiKey = configuration.GetApiKey();
}
Please see below reference

My requirement is just to add a tag in infusionsoft contact using API.

Please help me to get out of this.

Thanks, Sonam