Troubleshooting 6 min read
Troubleshooting Common API Errors
403 Forbidden Errors
Cause: Invalid or expired API credentials, insufficient permissions, or wrong environment.
Solutions:
- Verify your API key and secret are correct
- Check if your OAuth token has expired and refresh it
- Ensure you're using the correct environment (sandbox vs production)
- Confirm your account has been enabled for API access
Authentication Failures
Cause: Incorrect OAuth flow, expired tokens, or malformed requests.
Solutions:
- Follow the OAuth 2.0 flow exactly as documented
- Implement automatic token refresh before expiry
- Check that the Authorization header format is correct:
Bearer <token> - Verify your client credentials are for the correct environment
Validation Errors
Cause: Missing required fields, incorrect data formats, or invalid values.
Solutions:
- Check all required fields in the invoice schema are populated
- Verify TIN numbers are valid and correctly formatted
- Ensure HSN codes are from the approved list
- Validate VAT calculations match the expected rates
Sandbox vs Production Issues
Cause: Using sandbox credentials in production or vice versa.
Solutions:
- Use separate configuration for sandbox and production
- Never mix credentials between environments
- Test thoroughly in sandbox before switching to production
- Check the API base URL matches the intended environment