Verifying solutions with the Rest API

Request

URL: https://api.botpoison.com/verify
Method: POST
bash
curl --request POST \
--url 'https://api.botpoison.com/verify' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{"secretKey": "sk_xxxxxxxx", "solution": "xxxxxxxx"}'

Response

json
{
"ok": boolean
"message": string
}

Testing your integration

You can use the special secret key test with the following special solution strings to simulate specific responses.

javascript
// Use solution="ok" to simulate a successful verification
const OK_REQUEST_DATA = { secretKey: "test", solution: "ok" }
const OK_RESPONSE = { ok: true }
// Use solution="nok" to simulate an unsuccessful verification
const NOT_OK_DATA = { secretKey: "test", solution: "nok" }
const NOT_OK_RESPONSE = { ok: false }