Skip to content

Utils.ConstructEvent method

Parses a JSON string from a webhook into a Event object, while verifying the webhook's signature

public static Evento? ConstructEvent(string json, string webHookSignature, string secret, 
    long tolerance = 300, bool throwOnApiVersionMismatch = true)
parameter description
json the json string to parse.
webHookSignature The value of the Amica-Signature header from the webhook request.
secret The webhook endpoint's signing secret.
tolerance The time tolerance, in seconds (default 300).
throwOnApiVersionMismatch If true (default), the method will throw an exception if the API version of the event doesn't match Amica.net's default API version (ApiVersion).

Exceptions

exception condition
ApplicationException

See Also