Facebook
LinkedIn
YouTube
Getting Started
Authentication
Authentication
  • V2 Authentication (Deprecated)
  • V3 Authentication
V2 API Documentation (Deprecated)V3 API Documentation
Getting Started
Authentication
Authentication
  • V2 Authentication (Deprecated)
  • V3 Authentication
V2 API Documentation (Deprecated)V3 API Documentation
  1. Getting Started
  • Choosing the Right API Version
  • Getting Started
  • Architecture
  • Quick Start
  • Authentication
  • Roles and API Access
  • API Categories
  • API Endpoints Reference
  • Making Your First API Call
  • Working with Encrypted Tokens
  • Code Examples
  • Error Handling
  • Best Practices
  • Troubleshooting
  • Support
  1. Getting Started

Best Practices

Best Practices#

1.
Token Management:
Refresh tokens before they expire (within 5 minutes of expiration)
Store tokens securely (httpOnly cookies or secure storage)
Clear tokens immediately on logout
Never log tokens in console or error messages
2.
API Usage:
Use pagination for large datasets
Implement caching for frequently accessed data
Use appropriate HTTP methods (GET, POST, PUT, DELETE)
Include proper error handling and retries
3.
Performance:
Batch requests when possible
Use query parameters for filtering instead of client-side filtering
Implement request debouncing for search operations
Cache static data (industries, ad sources, tags)
4.
Security:
Always use HTTPS in production
Validate and sanitize user input
Implement CORS restrictions
Monitor for suspicious activity
5.
Monitoring:
Log all API errors with request IDs
Track API response times
Monitor token refresh failures
Set up alerts for 5xx errors
Modified at 2026-03-23 17:19:55
Previous
Error Handling
Next
Troubleshooting
Built with