Hi,
Call to Delete contact_lists returns
status code 415
response
[
{
"error_key": "contacts.api.error",
"error_message": "The provided content-type 'text\/plain' is not supported."
}]
Why is content type needed as the call is not providing any request content.
Snippet of API client ASP.Net Core 3.1
httpClient.DefaultRequestHeaders.Add("Authorization", $"Bearer {accessToken}");
httpClient.DefaultRequestHeaders.Add("Accept", "application/json");
var response = await httpClient.DeleteAsync($"{baseUrl}{apiVersion}/contact_lists/{contactListId}");
var content = await response.Content.ReadAsStringAsync();
if (response.IsSuccessStatusCode)
{
var jObject = JObject.Parse(content);
return mapper.Map<DeleteContactListDto>(jObject);
}
else
logger.Warning(content);
Thanks
Solved! Go to Solution.
Changed how the request is sent and added empty content
Changed how the request is sent and added empty content
Support Tips
"There's a multitude of ways to engage your audience through us using your social platforms - via ads, social post metrics, email links, and more! " - Will
See ArticleSupport Tips
"Target your most engaged contacts by creating a segment. Create a special offer or show your appreciation!" - Caitlin
See ArticleSupport Tips
"Greet new contacts with one or more automated Welcome Emails depending on their interests or your business goals." - Nick
See Article