Reputation: 1264
I'm new to this so what I want to do is post an Ajax to campaign monitor to add a new subscriber to a my list. The issue here is that I've carried out the right procedures using Campaign Monitors documentation. However I get a 401 error on the response regarding that the request was not authenticated. I'm just wondering how would I use the API Key for this instance.
In JSON i am passing:
{ "Email Address": "[email protected]", "Name": "Test" }
Im passing this through by C#
using (var client = new HttpClient())
{
var response = await client.PostAsync("https://api.createsend.com/api/v3.1/subscribers/LISTID.json", new StringContent(senderInfo, Encoding.UTF8, "application/json"));
}
Is there something I'm meant to be passing through here?
Upvotes: 0
Views: 778