Zum Inhalt springen

API Keys

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

API keys allow you to interact with Prosopo services programmatically — for example, managing access control rules, querying traffic data, or verifying CAPTCHA solutions from your backend without using the portal UI.

API key management is available to accounts with the API feature enabled. Check your account’s feature flags in the portal.

  1. Log in to the Prosopo Portal
  2. Navigate to API Keys from the main menu
  3. Click Create API Key
  4. Fill in the required fields:
    • Name (required): A descriptive label for the key, e.g. “Production Backend” or “CI/CD Pipeline”
    • Expiration Time (optional): Time in seconds until the key expires. Leave empty for a key that does not expire.
    • Permissions (required): Select which operations this key can perform (see below)
  5. Click Create API Key

After creation, the full API key is displayed once. Copy it immediately — it cannot be retrieved later.

Each API key is scoped to a specific set of permissions. Only grant the permissions the key actually needs.

PermissionDescription
getRulesList access control rules
getSuggestionGet a single rule suggestion
getSuggestionsList rule suggestions
applySuggestionsApply suggested rules
createRuleCreate a new access control rule
deleteRuleDelete an access control rule
deleteRuleGroupDelete an access control rule group
PermissionDescription
getSiteGet a single site’s details
getSitesList all sites
createSiteCreate a new site
deleteSiteDelete a site
updateSiteUpdate site settings
PermissionDescription
getApiKeysList API keys
createApiKeyCreate a new API key
updateApiKeyUpdate an existing API key
deleteApiKeyDelete an API key
PermissionDescription
getUsersList team members
createUserInvite a new team member
updateUserUpdate a team member’s role
deleteUserRemove a team member
PermissionDescription
getTrafficQuery traffic analytics data
PermissionDescription
verifyVerify CAPTCHA solutions
PermissionDescription
searchCaptchaRecordsSearch and retrieve CAPTCHA audit records

Include the API key in the Authorization header of your HTTP requests:

Terminal window
curl -X GET https://api.prosopo.io/v1/prosopo/provider/admin/rules \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"

Or in code:

const response = await fetch('https://api.prosopo.io/v1/prosopo/provider/admin/rules', {
headers: {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
});

The API Keys page shows all keys for your account:

  • Name: The label you gave the key
  • Created: When the key was created
  • Expires: When the key expires (or “Never” for non-expiring keys)
  • Permissions: Which operations the key can perform

To revoke an API key, click the delete button next to it in the API Keys list. The key is immediately invalidated — any requests using it will be rejected.

Deletion is permanent and cannot be undone. If you delete a key by mistake, create a new one and update your application with the new key.

Only grant the permissions each key actually needs. A key used solely for CAPTCHA verification should only have the verify permission — it does not need createSite or deleteRule.

Use Expiring Keys for Temporary Access

Section titled Use Expiring Keys for Temporary Access

When granting access to a contractor, CI/CD pipeline, or temporary integration, set an expiration time so the key is automatically invalidated.

For long-lived production keys, rotate them periodically:

  1. Create a new key with the same permissions
  2. Update your application to use the new key
  3. Verify the new key works
  4. Delete the old key

API keys should only be used in server-side code. Never embed them in frontend JavaScript, mobile apps, or public repositories. For client-side CAPTCHA integration, use site keys instead — see Client-side Rendering.

Review the Audit page and traffic analytics to detect any unexpected API key usage patterns that could indicate a compromised key.