Is it possible to use the .NET wrapper without using the app config for the api key value? I'd like to set that value programmatically, rather than hard-coding it.
It appears the apiKey is pulled from the AppConfig file and the .NET wrapper doesn't provide any way to set it programmatically. It looks like I will need to use the source code for the .NET wrapper and alter it so that I can set the API on the fly.
If there is an easier way to do this, I'd love to know.
You can set the authentication used by the .Net wrapper by calling the HttpHelper.OverrideAuthenticationCredentials method. This should allow you to store your API Key anywhere, or use multiple keys in a single app.
Supposing your API Key was abc123 you'd call
From Australia to Zimbabwe, and everywhere in between, companies count on Campaign Monitor for email campaigns that boost the bottom line.Get started for free