Choosing closed or open
With fail="closed", the form is held until the check finishes. If the check cannot finish, the form is not sent. With fail="open", the form can still be sent, and your server decides what to do. Use closed for sign-ups, reviews and anything that creates an account or a public post. Consider open for a contact form, where losing a genuine enquiry costs more than receiving one spam message.
Check the result on your server
When the form is sent, it includes a token in the field interlink-verify-response. Keep the site secret on your server and never put it in the page. The same proof cannot be used twice, and it expires 120 seconds after it was issued.
Ask Verify. Send POST /v1/siteverify with JSON fields secret and response. A passed check returns success: true and a token signed with Ed25519. A failed check returns success: false and an error code.
Check that token yourself, once you hold it. GET /v1/keys publishes the Ed25519 public keys. Cache them for five minutes, which is what the response asks. Verifying the signature on your own server checks a token you already have. The value in the form is the proof, so the first acceptance of a submission is still the call to Verify.
Test it
Send your form normally and confirm it arrives. Send it with the token removed and confirm your server rejects it. Send the same token twice and confirm the second attempt is rejected.
Hosting the files yourself
You can serve the two files from your own site instead of ours. Save verify.js and worker.js from /widget/v2/, serve them from the same folder, and keep the integrity value matched to the file you serve. When we release a new version, update both files together.
Content Security Policy
If your site sends a Content Security Policy, allow this host for the script, for the call that fetches the challenge, and for the worker. A page on another website loads the worker through a blob address. That means script-src, connect-src and worker-src for https://verify.interlink.digital, and worker-src for blob:.
Help
Call 01253 486350 or email support@interlink.digital.