dtect Security API
Status PageDashboard
Status PageDashboard
  1. Getting Started
  • Getting Started
    • Introduction
    • Security Features
    • Security Request
    • API Credentials
  • Frontend SDK
    • Introduction
    • Quality Questions & AI Detection
    • React
    • JavaScript
    • Error List
  • Security Token
    • Introduction
    • Retrieve Security Result using Security Token
      GET
  1. Getting Started

Security Request

To use the dtect Security API you need to install one of our Frontend SDKs and initialize it with the right configuration.
Each call to the SDK requires specific fields depending on which method you use.

Initialization (init())#

Init must be complete to call any other method. When you initialize the SDK, you must provide:
FieldRequiredDescription
clientId✅The Public Client ID representing your application.
apiKey✅The Public API Key used to authenticate requests from the frontend.
includeResults❌Controls whether results for AI Usage Detection and Quality Questions are returned to the frontend or only available on your backend. Defaults to false.
TIP
clientId and apiKey are always required. includeResults is optional and only affects AI Usage Detection and Quality Questions.

SDK Methods#

getSecurityToken / getSecurityResult#

These methods are used to generate a Security Token or retrieve a Security Result.
FieldRequiredDescription
projectId✅A unique identifier for a project, study, or survey. Used for deduplication checks.
visitorId❌An ID for the visitor being evaluated. If not provided, the isDuplicateId check will always return false.
metaData❌Any additional information you want to attach to the request.
securitySettings❌Customize the security checks.
securitySettings.countriesAllowed❌List of allowed countries in lowercase ISO alpha-3 codes. If not provided, the isLocationBlocked check will always return false.

isAIUsageDetected#

Checks whether AI tools or behavior patterns were detected for the visitor.
FieldRequiredDescription
projectId✅A unique identifier for a project, study, or survey. Used for deduplication checks.
visitorId❌An ID for the visitor being evaluated.

checkQualityQuestions#

Validates a visitor’s answers against quality control questions.
FieldRequiredDescription
projectId✅A unique identifier for a project, study, or survey. Used for deduplication checks.
questions✅List of question/answer objects to validate.
visitorId❌An ID for the visitor being evaluated.

getQualityQuestions#

Retrieves 4 randomized quality questions (3 single/multi-select + 1 open-ended).
FieldRequiredDescription
respondentType✅See the list of supported respondent types.
language❌Defaults to English. See the list of supported languages.

Learn More#

Refer to the Frontend SDK Introduction for detailed instructions and examples on how to use each method.
Previous
Security Features
Next
API Credentials