Closed ixnas closed 6 months ago
Hi, yes you're right about that. The API docs is still work in progress.
The API simply concatenates the field values with \n
and computes SHA (the same algo as signature, values in order listed in fields
):
For fields
= field1,field2,field3
fieldsHash = sha2_hex(field1_value + '\n' + field2_value + '\n' + field3_value)
This will be added to the docs.
Thanks for the quick reply, got it working!
Hi there!
I'm trying to implement the verification for the
verificationData
field in the payload when using the spam filter API.I feel like simply verifying the API signature on the server isn't enough, because someone could send different form data to the API than to the server.
So I'm trying to also verify the
fieldHash
property (I assume it's there for this purpose), but I can't figure out how the API combines the field values before it hashes them. Could you shed some light on this?Thanks!