API Key Generation
Learn how to generate and manage your urvo API keys
Learn how to generate and manage your urvo API keys. API keys are essential for authenticating with the urvo platform and accessing your voice agents programmatically.
Generating Your First API Key
Follow these steps to generate your first API key:
- Log in to your urvo dashboard
- Navigate to Settings → API Keys
- Click "Create New API Key"
- Choose your key type (Secret or Publishable)
- Add a descriptive name for the key
- Set permissions and restrictions (optional)
- Click "Generate Key"
Important: Copy your API key immediately after generation. For security reasons, you won't be able to view it again.
Key Management
Naming Conventions
Use descriptive names for your API keys to make management easier:
- Production Server:
prod-server-main - Development:
dev-testing-environment - CI/CD Pipeline:
github-actions-deploy - Mobile App:
mobile-app-v2
Key Permissions
You can restrict API key permissions to enhance security:
Read Permissions
- View agents
- Read call logs
- Access analytics
- View integrations
Write Permissions
- Create/modify agents
- Update integrations
- Manage team members
- Delete resources
Testing Your API Keys
Once you've generated an API key, test it with a simple request:
curl -X GET "https://api.urvo.io/v1/user" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"A successful response will return your user information:
{
"id": "user_abc123",
"email": "you@company.com",
"name": "Your Name",
"plan": "pro",
"created_at": "2024-01-15T10:30:00Z"
}Environment Setup
Store your API keys securely using environment variables:
# urvo API Configuration
URVO_API_KEY=sk-urvo-your-secret-key-here
URVO_API_URL=https://api.urvo.io/v1
# Optional: Set environment
NODE_ENV=productionUsing in Code
Here's how to use environment variables in different languages:
const urvoApiKey = process.env.URVO_API_KEY;
const response = await fetch('https://api.urvo.io/v1/agents', {
headers: {
'Authorization': `Bearer ${urvoApiKey}`,
'Content-Type': 'application/json'
}
});import os
import requests
api_key = os.getenv('URVO_API_KEY')
response = requests.get(
'https://api.urvo.io/v1/agents',
headers={
'Authorization': f'Bearer {api_key}',
'Content-Type': 'application/json'
}
)Key Rotation
Regularly rotate your API keys to maintain security:
- Generate a new API key
- Update your applications with the new key
- Test that everything works correctly
- Revoke the old API key
- Monitor for any failed requests
Troubleshooting
Common Errors
401 Unauthorized
Your API key is missing, invalid, or has been revoked. Check that you're using the correct key.
403 Forbidden
Your API key doesn't have permission for this action. Check your key's permissions.
429 Too Many Requests
You've exceeded your rate limit. Wait before making more requests or upgrade your plan.