Skip to main content
GET
/
api
/
adm
/
companyProjects
/
{id}
/
recaptcha
Get Project reCAPTCHA Settings
curl --request GET \
  --url https://localhost:44371/api/adm/companyProjects/{id}/recaptcha \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "code": 200,
  "errorMessage": null
}

Description

Fetches the reCAPTCHA configuration used for bot detection and fraud prevention in payment forms. The settings include the site key (public), secret key (private), reCAPTCHA version (v2 or v3), and score thresholds for determining when to challenge users.

Input

  • Path Parameter: id (guid, required) — Unique identifier of the project whose reCAPTCHA settings to retrieve.

Output

Returns a RecaptchaSettingsQueryResponse containing the reCAPTCHA configuration or null values if not configured.

Example Request

GET /api/admin/companyProjects/7bc94a21-8833-4d2f-a5e1-9f4b2d8c1e7a/recaptcha-settings
Authorization: Bearer {token}

Example Response (v3 Configuration)

{
  "success": true,
  "code": 200,
  "errorMessage": null,
  "data": {
    "siteKey": "6LdxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxL",
    "secretKey": "6LdxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxS",
    "version": "v3",
    "scoreThreshold": 0.5,
    "isEnabled": true
  }
}

Example Response (Not Configured)

{
  "success": true,
  "code": 200,
  "errorMessage": null,
  "data": {
    "siteKey": null,
    "secretKey": null,
    "version": null,
    "scoreThreshold": null,
    "isEnabled": false
  }
}

Errors

  • 404 Not Found — No project exists with the specified ID.
  • 401 Unauthorized — Missing or invalid authentication token.
  • 403 Forbidden — User does not have permission to access this project.

Notes

  • Secret key is sensitive and should be protected; only expose to admin users.
  • reCAPTCHA v3 uses score thresholds (0.0-1.0) while v2 uses checkbox challenges.
  • Projects without reCAPTCHA configured return null values with isEnabled=false.
  • Site key is safe to expose in frontend code; secret key must remain server-side.

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

id
string<guid>
required

The unique identifier of the project whose reCAPTCHA settings to retrieve.

Response

Always returned. Check the success property in the response body to determine if the operation succeeded.

Standard response structure containing operation status and error information.

success
boolean

True if the operation completed successfully; false if an error occurred.

Example:

true

code
enum<string>

Result code indicating the outcome of the operation.

Available options:
Unknown,
Success,
BadRequest,
Unauthorized,
NotFound,
Error
Example:

200

errorMessage
string | null

Human-readable error message when an error occurs.

Example:

null

id
string<guid>
recaptchaThreshold
number<double> | null
defaultRecaptchaThreshold
number<double> | null