Authentication
Access to the NIL Taxonomy API requires authentication with an API key.
The NIL Taxonomy is proprietary. API keys are required to access taxonomy data through the API.
Getting an API Key
Contact Licensing
Email licensing@nil-taxonomy.org with:
- Your organization name
- Use case description
- Expected usage volume
- Deployment environment (development, staging, production)
Receive Your Key
You'll receive an API key in the format:
nilk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxSave this key immediately! You will not be able to retrieve it again.
Store Securely
Add to your environment variables:
NIL_TAXONOMY_API_KEY=nilk_your_key_here
NIL_TAXONOMY_API_URL=https://api.nil-taxonomy.org/api/nilNever commit API keys to version control.
Test the Connection
import { NILTaxonomyClient } from '@nil-taxonomy/sdk';
const client = new NILTaxonomyClient({
baseUrl: process.env.NIL_TAXONOMY_API_URL!,
apiKey: process.env.NIL_TAXONOMY_API_KEY!,
});
try {
const versions = await client.getVersions();
console.log('✓ Connected successfully');
console.log('Available versions:', versions);
} catch (error) {
console.error('✗ Connection failed:', error);
}SDK Configuration
Basic Setup
import { NILTaxonomyClient } from '@nil-taxonomy/sdk';
const client = new NILTaxonomyClient({
baseUrl: 'https://api.nil-taxonomy.org/api/nil',
apiKey: process.env.NIL_TAXONOMY_API_KEY!,
});Advanced Configuration
const client = new NILTaxonomyClient({
baseUrl: process.env.NIL_TAXONOMY_API_URL!,
apiKey: process.env.NIL_TAXONOMY_API_KEY!,
timeout: 30000, // Request timeout in ms (default: 30000)
retries: 3, // Number of retries on failure (default: 3)
retryDelay: 1000, // Delay between retries in ms (default: 1000)
});API Key Usage
In API Requests
When making direct HTTP requests (without the SDK), include your API key in the Authorization header:
curl -H "Authorization: Bearer nilk_your_key_here" \
https://api.nil-taxonomy.org/api/nil/v1/licensesKey Management
Rotate Keys
For security, rotate your API keys periodically:
- Generate a new key
- Update your environment variables
- Deploy the update
- Revoke the old key after confirming the new one works
Revoke Compromised Keys
If your key is compromised:
- Email security@nil-taxonomy.org immediately
- Include the key prefix (first 12 characters)
- We'll revoke it and issue a replacement
Rate Limits
API keys have usage quotas based on tier:
| Tier | Requests/Hour | Requests/Day |
|---|---|---|
| Free | 100 | 1,000 |
| Professional | 1,000 | 10,000 |
| Enterprise | Unlimited | Unlimited |
Rate limit information is returned in response headers:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1640995200Troubleshooting
"Invalid API Key" Error
- Verify the key is correct (no extra spaces)
- Check that the key hasn't been revoked
- Ensure you're using
Bearerauthentication scheme
Rate Limit Exceeded
- Upgrade to a higher tier
- Implement caching to reduce API calls
- Contact support for temporary limit increases
Connection Timeout
- Check your network connectivity
- Verify firewall settings allow HTTPS traffic
- Try increasing the timeout value in client config
Security Best Practices
-
Never commit keys to version control
- Use
.envfiles (add to.gitignore) - Use environment variables in production
- Use
-
Use separate keys for environments
- Development key for local testing
- Staging key for pre-production
- Production key for live deployments
-
Monitor key usage
- Check usage stats regularly
- Set up alerts for unusual activity
- Rotate keys every 90 days
-
Restrict key access
- Only share keys with authorized team members
- Use secrets management (AWS Secrets Manager, Vault, etc.)
- Revoke keys when team members leave