Overview
VerbalisAI API uses API key authentication for secure access to all endpoints.Authentication Methods
API Key Authentication
Secure authentication for all API requests
Google OAuth
Social login integration for user authentication
API Key Authentication
API keys are perfect for server-to-server communication where you need to authenticate as your application rather than a specific user.Getting Your API Key
1
Access Dashboard
Log in to your VerbalisAI Dashboard
2
Navigate to API Keys
Go to Settings → API Keys
3
Create New Key
Click “Create API Key” and provide a descriptive name
4
Copy and Store
Copy the generated key and store it securely
Using API Keys
Include your API key in theAuthorization
header:
Never expose API keys in client-side code. Always use environment variables or secure configuration management.
Google OAuth
VerbalisAI supports Google OAuth for social login integration.OAuth Flow
1
Initiate OAuth
Redirect users to the Google OAuth endpoint
2
User Authorization
User grants permission through Google’s interface
3
Callback Handling
Handle the callback to complete authentication
4
Token Exchange
Exchange the authorization code for access tokens
Implementation
Error Handling
Common authentication errors and how to handle them:401 Unauthorized
401 Unauthorized
403 Forbidden
403 Forbidden
429 Rate Limited
429 Rate Limited
Best Practices
Security
- Store API keys securely
- Use HTTPS for all requests
- Never expose credentials in client-side code
Error Handling
- Always check response status codes
- Implement retry logic for transient errors
- Handle authentication failures gracefully
- Log authentication errors for debugging
Performance
- Implement connection pooling
- Use appropriate timeout values
- Monitor authentication success rates