Overview
This guide provides step-by-step instructions for setting up authentication with Zupy’s loyalty APIs. You’ll learn how to verify your partner account, generate secure API keys, and implement authentication in your application.Prerequisites: Active Zupy partner account with developer dashboard access
Step 1: Account Verification & Dashboard Access
Access Your Developer Dashboard
Navigate to the Zupy developer dashboard to begin the authentication setup process:Partner Account Requirements
Your partner account must have:Verified Business Information
Company name, CNPJ, and business address verified
Active Partnership Agreement
Signed partnership agreement with Zupy platform
Verified Contact Information
WhatsApp number and email address verified for OTP delivery
Step 2: OTP Verification Process
Before generating API keys, you must complete identity verification using our One-Time Password (OTP) system.WhatsApp OTP Verification (Primary Method)
1
Initiate Verification
Click “Verify Account” or “Generate API Key” in your dashboard
2
Request OTP
Select “Send via WhatsApp” for OTP deliveryImportant: Use the same WhatsApp number registered with your partner account
3
Receive Code
Check your WhatsApp for a message like:
4
Enter Code
Input the 6-digit code in the verification dialog within 5 minutes
5
Confirmation
Successful verification enables API key generation for 24 hours
Email OTP Verification (Backup Method)
If WhatsApp verification fails or is unavailable:1
Select Email Option
Click “Send via Email” in the verification dialog
2
Check Email
Look for an email from
[email protected] with subject “Zupy Developer Verification”Check spam folder if the email doesn’t arrive within 2 minutes3
Enter Email Code
Email codes are valid for 10 minutes and follow the same 6-digit format
Troubleshooting OTP Issues
OTP Code Not Received
OTP Code Not Received
WhatsApp Issues:
- Verify your registered WhatsApp number is correct in your partner profile
- Ensure WhatsApp Business API messages aren’t blocked on your device
- Check if your WhatsApp is connected to the internet
- Try requesting email OTP as an alternative
- Check spam/junk folders for the verification email
- Verify the email address in your partner profile is correct
- Ensure emails from
zupy.comdomain aren’t blocked by your email provider - Check email filtering rules that might redirect Zupy emails
- Wait 60 seconds before requesting a new code to avoid rate limiting
- Clear browser cache and cookies if the verification dialog isn’t working
- Try using an incognito/private browser window
- Contact support at [email protected] if issues persist
OTP Code Expired
OTP Code Expired
Common Causes:
- WhatsApp codes expire after 5 minutes
- Email codes expire after 10 minutes
- Code was already used successfully
- Browser session timed out during verification
- Request a new OTP code using the same method
- Complete verification within the time limit
- Use the most recently received code (previous codes become invalid)
- Refresh the browser page if the verification dialog is unresponsive
Invalid Code Error
Invalid Code Error
Possible Issues:
- Code was mistyped (common with similar-looking numbers)
- Code has expired
- Using an old code when a new one was requested
- Browser autofill entered incorrect information
- Double-check each digit of the code
- Ensure you’re using the most recent code received
- Manually type the code instead of copy-pasting
- Request a fresh code if the current one isn’t working
Step 3: API Key Generation
After successful OTP verification, you can generate API keys for your integrations.Development/Staging Keys
Start with staging keys for development and testing:- Environment:
stagingfor development,productionfor live use - Rate Limit: 500 requests/minute recommended for staging
- Permissions: Include all permissions you’ll need for testing
Production Keys
For production deployment, create keys with minimal necessary permissions:- Minimal Permissions: Only include permissions your application actually uses
- IP Restrictions: Limit access to known IP addresses or networks
- Expiration: Set reasonable expiration dates (6-12 months)
- Higher Rate Limits: Request higher limits for production traffic
API Key Response Format
When you generate an API key, you’ll receive a response like this:Step 4: Secure Key Storage
Environment Variables (Recommended)
Store API keys as environment variables, never in source code:Docker/Container Deployment
For containerized applications, pass environment variables at runtime:Key Rotation Strategy
Implement regular key rotation for enhanced security:1
Generate New Key
Create a new API key with identical permissions to the current one
2
Update Configuration
Update your application configuration with the new key
3
Deploy Changes
Deploy the updated configuration to all environments
4
Test New Key
Verify the new key works correctly with a test API call
5
Monitor Usage
Check API key usage statistics in the dashboard
6
Revoke Old Key
After confirming the new key works, revoke the previous key
- Development Keys: Every 90 days
- Production Keys: Every 60 days
- High-Security Environments: Every 30 days
Step 5: Implementation & Testing
Basic Authentication Implementation
Implement API authentication in your application:Authentication Testing
Test your authentication implementation with these verification steps:Test 1: Valid API Key
Test 1: Valid API Key
Test 2: Invalid API Key
Test 2: Invalid API Key
Test 3: Missing Authorization
Test 3: Missing Authorization
Test 4: Permission Check
Test 4: Permission Check
Step 6: Monitoring & Maintenance
API Key Usage Monitoring
Monitor your API key usage through the developer dashboard: Key Metrics to Track:- Request Volume: Daily/hourly request counts
- Error Rates: Authentication failures and permission errors
- Rate Limiting: How close you’re getting to limits
- Last Used: When the key was last accessed
Health Checks
Implement regular health checks for your authentication:Troubleshooting Common Issues
Intermittent Authentication Failures
Intermittent Authentication Failures
Symptoms: Random 401 errors despite valid API keyPossible Causes:
- Network connectivity issues
- DNS resolution problems
- Clock synchronization issues
- Firewall blocking API requests
- Implement retry logic with exponential backoff
- Check system clock synchronization
- Verify network connectivity to
api.zupy.com - Check firewall/proxy settings
Permission Errors After Key Update
Permission Errors After Key Update
Symptoms: 403 permission denied errors after generating new keyPossible Causes:
- New key has different permissions than expected
- Cached old key still being used
- Application using wrong key for specific operations
- Compare new key permissions with old key in dashboard
- Clear application cache/restart services
- Verify environment variables are updated correctly
- Test each required permission individually
Rate Limiting Issues
Rate Limiting Issues
Symptoms: 429 rate limit exceeded errorsPossible Causes:
- Application making too many requests too quickly
- Multiple application instances using same key
- Inefficient API usage patterns
- Implement request queuing/throttling
- Use separate keys for different application instances
- Cache API responses to reduce request volume
- Review API usage patterns for optimization opportunities
Next Steps
After completing authentication setup:Integration Development
Follow the complete integration guide to build your loyalty program integration
API Reference
Explore detailed API documentation for all available endpoints
Webhook Setup
Configure webhooks for real-time event notifications
Support: Contact [email protected] if you encounter any issues during authentication setup or need assistance with API key configuration.