Turing helps to avoid malicious clients by flexible challenges.
npm install @fpjs-incubator/turingTuring helps to avoid malicious clients by flexible challenges.
You can generate your keys there.
You can get started quickly with CDN, or install Turing with npm and modern build tools.
Simply download and include with a script tag. Turing will be registered as a global variable.
To disable BotD, add disable-botd attribute to script load.
1. Load the Turing API
``html`
.1. Load the Turing API
`html
`2. Create a
with turing-spot attribute.
`html
`$3
1. Load the Turing API
`html
`2. Call
Turing.execute() on each action you wish to protect.
`js
Turing.ready(() => {
Turing.execute().then(async sessionId => {
// Add your logic to submit to your backend server here.
})
})
`3. Send sessionId to your backend with the request to verify
NPM
In order to install the node module, you can use NPM
`js
npm install @fpjs-incubator/turing
`Or you can install with Yarn:
`js
yarn add @fpjs-incubator/turing
`Verify response
POST https://turing.fpapi.io/api/v1/verify
-
session_id - session id which can be found by turing-session-id key form value.
- secret_key - your secret key.
`sh
curl --location --request POST 'https://turing.fpapi.io/api/v1/verify' \
--header 'Content-Type: application/json' \
--data-raw '{ "session_id": "", "secret_key": "" }'
`Response OK
`json
{
"solved": true
}
`Response Error
`json
{
"error": {
"message": ""
}
}
``