gabrieldwight / Whatsapp-Business-Cloud-Api-Net

This is C# wrapper of whatsapp business cloud api for .NET
MIT License
300 stars 119 forks source link

(#100) Invalid parameter when sending InteractiveMessageDateTime #105

Open sotskopa opened 3 hours ago

sotskopa commented 3 hours ago

When sending InteractiveTemplateMessageRequest, I get Invalid parameter, Code 100 from the Graph API. I believe this is because InteractiveMessageDateTime has a bunch of default parameters that are not ignored when serializing into the POST payload, e.g. DayOfWeek, Year, Month, and so on. The Cloud API expects only fallback_value in a date_time, so adding NullValueHandling or removing these properties is preferred.

gabrieldwight commented 3 hours ago

I will push an update with the fix for NullValueHandling of InteractiveMessageDateTime.