Basic Authentication using the .net wrapper

I'm kind of confused. 

Below are my lines of code

IEnumerable<createsend_dotnet.BasicTemplate> basictemplate;

createsend_dotnet.Client CMClient = new createsend_dotnet.Client("04a004bbf7bee1947123af1102b60a6f");

basictemplate = CMClient.Templates();

the error that is returning is "The CreateSend API responded with the following error - 50: Must supply a valid HTTP Basic Authorization header"

How do I send the authorization header in .net c#.  thanks.

jamesd jamesd, 6 years ago

You'll need to set your API key using an appSettings entry in your config file. See the createsend-dotnet README for an example of how this is done.

Join 150,000 companies around the world that use Campaign Monitor to run email marketing campaigns that deliver results for their business.

Get started for free