📄️ Overview
About this getting started tutorial
📄️ Obtaining credentials
Before you can use Danger, you’ll need both a site key and a secret key. There's a free plan, and Danger is free forever for validation and basic risks up to 10k events a month.
📄️ Add the widget
Next, you'll need to add the widget to your form. You'll need to insert your site key where indicated:
📄️ Send an event
You should now turn your attention to the server. You'll need to find the code that processes the form on the server.
📄️ Success response
A successful response has a HTTP status code of 200, and always contains a response JSON that looks like this:
📄️ Error response
Error responses have a non-200 HTTP status code and sometimes have a JSON body with a human-readable message in the format:
📄️ Handing edge cases
Since the API is often called at critical points in an application (i.e. user registration, during a transaction), it's important to write failsafe code.
📄️ What next?
This tutorial covers all the basics. Hopefully now, your application is protected with Danger.