Initial Test
Last updated
Last updated
Sign up . You have 1,000 free requests per month. No credit card required.
Follow to find your API keys.
Find and open terminal (Mac) or Command Line (Windows) or the equivalent on your computer. We will be using cURL for this test, which normally comes preinstalled.
Copy and paste the following multi-line command into your terminal, making sure to replace SECRET_API_KEY with your key:
curl -X POST https://api.dfend.app/identity \
-H 'Content-Type: application/json' \
-H 'x-api-key: SECRET_API_KEY' \
-d '{"userId":"test"}'
After replacing the value, press enter to run the command. See the response log, and continue to the next step assuming there was no error.
If you encounter an error that hints at Identity, please ensure that the entire command was pasted.
Find your public IP address. Run the following command:
curl ifconfig.me
This will log your public IP address. There may be an extra %
character on the end. Ignore this character. Only use the numbers and dots.
You will use your IP address in the next step.
Similar to how you created an Identity, run this multi-line command from terminal, replacing SECRET_API_KEY with your key and IP_ADDRESS with your IP address.
curl -X POST https://api.dfend.app/signal \
-H 'Content-Type: application/json' \
-H 'x-api-key: SECRET_API_KEY' \
-d '{"source":"Server","ip":"IP_ADDRESS","identifiers":{"userId":"test"}}'
Enter your IP address between the quotes, preserving them.
Congratulations, you've finished the test!
Use the tool at . Since you already created your test Identity, ignore that section.
The demo tool uses the DFend , which you can add to any website or app that runs in a JavaScript environment.
View the Identity you created .
View the Signal you sent .
If you would like to trigger an anomaly, switch to a VPN on a location far from where you were initially located. Send another signal using the tool at for the same test Identity. Then visit the Events page under the Insights submenu in Dashboard.