Skip to main content

Overview

Follow these best practices to ensure your Sticker integration is secure, performant, and provides the best user experience.

Authentication & Security

DO:
  • Store API keys in environment variables
  • Use secrets management systems (AWS Secrets Manager, HashiCorp Vault)
  • Use different keys for sandbox and production
  • Keep keys server-side only
DON’T:
  • Hardcode API keys in source code
  • Commit keys to version control
  • Share keys in chat/email
  • Expose keys in client-side code
DO:
  • Generate tokens on-demand when user opens module
  • Handle token expiration gracefully (tokens last 5 min)
  • Regenerate tokens on authentication errors
  • Clear any references when user logs out
DON’T:
  • Pre-generate tokens in advance
  • Cache or store session tokens
  • Reuse tokens across sessions
  • Share tokens between users
DO:
  • Use sandbox attribute with proper permissions
  • Implement Content Security Policy
  • Use HTTPS for all environments
DON’T:
  • Remove sandbox permissions unnecessarily
  • Mix HTTP and HTTPS content
  • Disable security features for convenience

Error Handling

Implement Retry Logic

Use exponential backoff for transient failures:

Handle Rate Limiting

Respect rate limits and implement backoff:

User-Friendly Error Messages

Transform technical errors into helpful messages:

Performance Optimization

Don’t Cache Session Tokens

Session tokens are single-use and short-lived—never cache them:

Preconnect to Sticker Domain

Speed up iframe loading:

Monitor Performance

Track integration performance metrics:

User Experience

Loading States

Always show loading indicators:

Graceful Degradation

Provide fallback options when integration fails:

Data Management

Use Your Internal IDs

Always use your internal identifiers for easy correlation:

Handle Existing Users Gracefully

The setup endpoint returns 409 if user already exists—don’t treat this as an error:

Testing

Integration Tests

Test your integration thoroughly:

Use Sandbox Environment

Always test in sandbox first:

Deployment Checklist

Before going live, verify:
1

Security

  • API keys stored securely in environment variables
  • API key never exposed in client-side code
  • iframe sandbox attributes configured
  • HTTPS enabled on all pages
2

Error Handling

  • Retry logic with exponential backoff
  • Rate limiting handled gracefully
  • User-friendly error messages
  • Fallback UI for failures
3

User Experience

  • Loading states for all async operations
  • Responsive design on mobile devices
  • Clear error messaging
  • Easy retry/refresh options
4

Performance

  • iframe loads in < 3 seconds
  • API calls complete in < 2 seconds
  • Metrics tracking implemented
5

Testing

  • All integration tests passing
  • Tested in sandbox environment
  • Manual QA completed
  • Cross-browser testing done
  • Mobile testing completed

Getting Help

Partner Support

Technical support for integration issues

Schedule Call

Book time with solutions engineers