Setting up API Key

Generate and configure API keys to authenticate your applications with Cipherion's encryption services.

Prerequisites:

Ensure your project is created and you have the necessary permissions to generate API keys.

API Key Generation Process

1
Navigate to Credentials Section
Access the API key management interface
  1. Go to your project dashboard in the Cipherion console
  2. Navigate to "Credentials" → "API Keys"
  3. Click "Generate New API Key" button
2
Configure Key Permissions (Coming Soon...)
Set appropriate scopes and permissions for your API key

Key Name and Description

Key Permissions

Required
Required

Environment

Rate Limits

3
Generate and Secure Your Key
Create your API key and store it securely

Click the button below to generate your API key. Make sure to copy and store it securely as it will only be shown once.

4
Configure Environment Variables
Set up your application environment

Environment Configuration

# .env file
CIPHERION_API_KEY=your_api_key_here
CIPHERION_PROJECT_ID=proj_abc123def456ghi789
CIPHERION_ENVIRONMENT=production

# Optional: API endpoint (defaults to production)
CIPHERION_API_ENDPOINT=https://api.cipherion.com/v1

Security Best Practices

  • Use environment variables to store API keys
  • Never hardcode API keys in your source code
  • Use different keys for different environments
  • Regularly rotate your API keys
  • Monitor API key usage and set up alerts
Testing Your API Key
Verify your API key is working correctly

Quick Test with cURL

curl -X POST https://api.cipherion.com/v1/encrypt \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"data": "test@example.com",
"data_type": "email"
}'

Expected Response

{
"success": true,
"encrypted_data": "cph_encrypted_...",
"data_type": "email",
"encryption_method": "field_level",
"request_id": "req_123456789"
}
Troubleshooting
Common issues and solutions

401 Unauthorized Error

Check that your API key is correctly formatted and has the required permissions.

429 Rate Limit Exceeded

You've exceeded your rate limits. Consider implementing exponential backoff or contact support to increase limits.

403 Forbidden

Your API key doesn't have permission for this operation. Review and update key permissions.