Skip to content

Check a bot challenge token one of your pages obtained

OpenAPI JSON
POST
/v1/apps/{app}/bot-protection/verify
curl --request POST \
--url https://api.eu.apigami.com/v1/apps/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/bot-protection/verify \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "token": "example", "action": "example" }'

Under the version key (APIGAMI_KEY) of a version declaring "bot_protection": true, or an API key of the application: whether the token of the widget drawn with APIGAMI_BOT_PROTECTION_SITE_KEY passed, on a host the application serves, under action when given. A token is valid five minutes and is spent by this call, whatever it answers. Guide: https://www.apigami.com/docs/app-bot-protection/

app
required

The application of the key.

string format: uuid
Media typeapplication/json
object
token
required

What the widget gave the page.

string
<= 2048 characters
action

The action the widget was drawn with; a token of another action does not pass.

string
<= 32 characters
Examplegenerated
{
"token": "example",
"action": "example"
}

The verdict: success true, or false with the reasons.

Media typeapplication/json
One of:
object
success
required
hostname
required

The host the challenge was passed on, one of the application’s.

string | null
action
required
string | null
challenge_ts
required
string | null format: date-time
Example
{
"success": true
}

A body without token, or with another field.

Media typeapplication/json
object
error
required
string
consentPending

Present and true when the approval window is open and the user has not answered within 45 s.

boolean
permission

On consent requested and no grant from emails.send or ai.generate: the permission the user never decided, or refused. Absent for a site.

string
Allowed values: emails ai
settings_url

On no grant: the page of the user’s Apigami space where they allow it again; send them there.

string format: uri
terms

On consent requested, in place of permission: the bare app_id of each application whose terms or subprocessors the user has yet to agree to, unlike the boxes of GET /apps/{app_id}. Only the connect page asks it: send them to connect_url, or to one of your pages.

Array<string>
connect_url

With terms, when the user agrees under your application: your install link, where they tick the boxes still to tick.

string format: uri
Example
{
"error": "send { \"token\": the widget's token, \"action\": optional, the widget's action }"
}

No key, or one no longer worth anything.

Media typeapplication/json
object
error
required
string
consentPending

Present and true when the approval window is open and the user has not answered within 45 s.

boolean
permission

On consent requested and no grant from emails.send or ai.generate: the permission the user never decided, or refused. Absent for a site.

string
Allowed values: emails ai
settings_url

On no grant: the page of the user’s Apigami space where they allow it again; send them there.

string format: uri
terms

On consent requested, in place of permission: the bare app_id of each application whose terms or subprocessors the user has yet to agree to, unlike the boxes of GET /apps/{app_id}. Only the connect page asks it: send them to connect_url, or to one of your pages.

Array<string>
connect_url

With terms, when the user agrees under your application: your install link, where they tick the boxes still to tick.

string format: uri
Example
{
"error": "bad client credentials"
}

app is not the key’s application.

Media typeapplication/json
object
error
required
string
consentPending

Present and true when the approval window is open and the user has not answered within 45 s.

boolean
permission

On consent requested and no grant from emails.send or ai.generate: the permission the user never decided, or refused. Absent for a site.

string
Allowed values: emails ai
settings_url

On no grant: the page of the user’s Apigami space where they allow it again; send them there.

string format: uri
terms

On consent requested, in place of permission: the bare app_id of each application whose terms or subprocessors the user has yet to agree to, unlike the boxes of GET /apps/{app_id}. Only the connect page asks it: send them to connect_url, or to one of your pages.

Array<string>
connect_url

With terms, when the user agrees under your application: your install link, where they tick the boxes still to tick.

string format: uri
Example
{
"error": "not found"
}

The version of the key, or under an API key production and --staging, does not declare bot_protection.

Media typeapplication/json
object
error
required
string
consentPending

Present and true when the approval window is open and the user has not answered within 45 s.

boolean
permission

On consent requested and no grant from emails.send or ai.generate: the permission the user never decided, or refused. Absent for a site.

string
Allowed values: emails ai
settings_url

On no grant: the page of the user’s Apigami space where they allow it again; send them there.

string format: uri
terms

On consent requested, in place of permission: the bare app_id of each application whose terms or subprocessors the user has yet to agree to, unlike the boxes of GET /apps/{app_id}. Only the connect page asks it: send them to connect_url, or to one of your pages.

Array<string>
connect_url

With terms, when the user agrees under your application: your install link, where they tick the boxes still to tick.

string format: uri
Example
{
"error": "bot protection is not declared: add \"bot_protection\": true to x-apigami and deploy"
}

The challenge cannot be checked right now.

Media typeapplication/json
object
error
required
string
consentPending

Present and true when the approval window is open and the user has not answered within 45 s.

boolean
permission

On consent requested and no grant from emails.send or ai.generate: the permission the user never decided, or refused. Absent for a site.

string
Allowed values: emails ai
settings_url

On no grant: the page of the user’s Apigami space where they allow it again; send them there.

string format: uri
terms

On consent requested, in place of permission: the bare app_id of each application whose terms or subprocessors the user has yet to agree to, unlike the boxes of GET /apps/{app_id}. Only the connect page asks it: send them to connect_url, or to one of your pages.

Array<string>
connect_url

With terms, when the user agrees under your application: your install link, where they tick the boxes still to tick.

string format: uri
Example
{
"error": "the challenge cannot be checked right now"
}