Skip to content

Overview

Castle integrations with many common app environments and languages. Below is the list of officially supported server SDKs and where to download them

Can’t find your language or framework?

Don’t hesitate to reach out to us!

Repositories#

cURL#

Sometimes it’s easier to first run a simple cURL example. In the example below, replace YOUR_API_SECRET with the one from your settings, and optionally replace the test request token test|device:firefox_on_windows with a real one generated by your client SDK.

cURL
curl --location --request POST 'https://api.castle.io/v1/filter' \
-u ':YOUR_API_SECRET' \
--header 'Content-Type: application/json' \
--data-raw '{
   "type": "$registration",
   "status": "$attempted",
   "request_token": "test|device:firefox_on_windows",
   "context":{
      "ip":"211.96.77.55",
      "headers":[
         ["User-Agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.1 Safari/605.1.15"],
         ["Accept-Encoding","gzip, deflate, br"],
         ["Accept-Language", "en-us"],
         ["Accept","text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"],
         ["Connection","close"],
         ["Host","castle.io"]
      ]
   },
   "user":{
      "email":"Rhea.Franecki@example.org",
      "phone":"+16175551212"
   }
 }'