API Authentication
Secure your IronWiFi REST API requests with Bearer token authentication. All API endpoints require a valid API key passed in the Authorization header to authenticate and authorize programmatic access to your IronWiFi account resources.
Generating an API Key
- Log into the IronWiFi Console
- Navigate to Account > API Keys
- Click Generate New Key
- Copy the key immediately
warning
The API key is only displayed once upon generation. Store it securely. If lost, generate a new key.
Using the API Key
Include the API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
Example with cURL
Example with PHP
Example with JavaScript
Example with Python
Required Headers
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer YOUR_API_KEY | Yes |
| Content-Type | application/json;charset=utf-8 | For POST/PUT |
API Key Security
Best Practices
- Never expose in client-side code - Only use server-side
- Use environment variables - Don't hardcode in source
- Rotate regularly - Generate new keys periodically
- Limit scope - Use separate keys for different purposes
- Monitor usage - Watch for unusual activity
Storing Keys Securely
Environment Variables:
Configuration Files:
Secret Management:
- AWS Secrets Manager
- HashiCorp Vault
- Azure Key Vault
Managing API Keys
Viewing Active Keys
- Navigate to Account > API Keys
- View list of active keys (masked)
- See creation date and last used
Revoking Keys
- Navigate to Account > API Keys
- Click Revoke next to the key
- Confirm revocation
note
Revoking a key immediately invalidates it. Any systems using that key will stop working.
Key Rotation
Recommended rotation schedule:
- Generate new key
- Update all systems using the old key
- Test functionality
- Revoke old key
Troubleshooting
401 Unauthorized
Causes:
- Invalid or revoked API key
- Missing Authorization header
- Wrong header format
Solutions:
- Verify key is correct
- Check header:
Authorization: Bearer KEY - Generate new key if needed
403 Forbidden
Causes:
- Key doesn't have required permissions
- IP restrictions (if configured)
Solutions:
- Check key permissions
- Verify source IP is allowed
Related Topics
Was this page helpful?