Hubspot webhooks payload is not getting desrialized
Hi Everyone,
I do not find hubspot webhook payload on my .net core 3.1 api endpoint. It's null , but when I am trying same using same payload using postman, it runs fine. My endpoint is configured as following:
[HttpPost("api/v2/webhooks/hubspot-data")]
public IActionResult HandelContactsWebhookEvents([FromBody]HubspotWebhookPayload payload,[FromQuery]string token) {
// payload is null here
return Ok();
}
public class HubspotWebhookPayload { public int objectId { get; set; } public string propertyName { get; set; } public string propertyValue { get; set; } public string changeSource { get; set; } public long eventId { get; set; } public int subscriptionId { get; set; } public int portalId { get; set; } public int appId { get; set; } public long occurredAt { get; set; } public string subscriptionType { get; set; } public int attemptNumber { get; set; } }