Skip to main content

Common Issues

Authentication Token Issues

Problem: Backend returns an error when calling Doshi API.Possible Causes:
  • Invalid API key
  • API key not provided in Authorization header
  • Invalid request parameters
  • Network connectivity issues
Solutions:
  1. Verify API key:
  1. Check environment variables:
  1. Validate request parameters:
  1. Check API response:
Problem: Token is rejected by the iframe.Possible Causes:
  • Token was generated too long ago
  • Token was already used
  • Token format is incorrect
Solutions:
  1. Generate token immediately before use:
  1. Donโ€™t reuse tokens:
  1. Verify token format:
Problem: API key is visible in client-side code.Danger: Anyone can steal your API key and impersonate your application.Solution:
  1. Move API calls to backend:
  1. Create backend endpoint:

postMessage Issues

Problem: The iframe is not receiving messages from the parent window.Solutions:
  1. Verify origin:
  1. Check iframe is loaded:
  1. Verify message format:
  1. Check for JavaScript errors:
Problem: Messages are rejected due to origin mismatch.Solutions:
  1. Log actual origins:
  1. Check for trailing slashes:
  1. Handle multiple environments:
Problem: Parent window never receives PING from iframe.Solutions:
  1. Check iframe URL:
  1. Wait for iframe to load:
  1. Check for errors in iframe:

Query Parameter Issues

Problem: Query parameters are missing from the iframe URL.Solutions:
  1. Debug URL construction:
  1. Check for undefined values:
Problem: URL exceeds browser limits (typically 2000 characters).Solutions:
  1. Check URL length:
  1. Reduce parameter size:
  1. Switch to postMessage:
Problem: Special characters not encoding properly.Solutions:
  1. Use URLSearchParams:
  1. Verify encoding:

2FA Issues

Problem: 2FA is enabled but OTP screen doesnโ€™t appear.Solutions:
  1. Verify 2FA flag:
  1. Check all required fields:
  1. Verify organization has 2FA enabled:
Problem: User doesnโ€™t receive the OTP code.Solutions:
  1. Verify phone number:
  1. Check OTP channel:
  1. Wait and retry:
Problem: Correct OTP code is rejected.Solutions:
  1. Check OTP expiration:
  1. Verify user details match:

Browser Compatibility

Problem: postMessage API not supported.Solution:
Problem: URLSearchParams not supported in older browsers.Solution:
Problem: Iframe doesnโ€™t load on iOS Safari.Solutions:
  1. Check iframe attributes:
  1. Ensure HTTPS:

Mobile WebView Issues

Problem: When keyboard opens, content gets squeezed and becomes not visible.Solution: Handle keyboard visibility in your app wrapper.iOS:
Android:
See Best Practices - Mobile Integration for complete code.
Problem: Users can pinch-to-zoom and it breaks the layout.Solution: Disable zoom in your WebView.Web:
iOS:
Android:
See Best Practices - Disable Zoom for details.
Problem: Doshi Frontend doesnโ€™t load in mobile WebView.Solutions:
  1. Enable JavaScript:
  1. Check HTTPS:
  • Ensure youโ€™re loading https://embed.v2.doshi.app
  • iOS requires HTTPS by default (App Transport Security)
  1. Check App Permissions:

Network Issues

Problem: Authentication takes too long.Solutions:
  1. Add timeout:
  1. Show loading state:
  1. Preconnect to domain:
Problem: Authentication works sometimes but fails randomly.Solutions:
  1. Implement retry logic:
  1. Check network status:

IP Whitelisting Issues

Problem: Receiving 403 Forbidden when calling Doshi API.Cause: Your server IP is not whitelisted.Solution:
  1. Find your server IP:
  1. Email hello@doshi.app with:
    • Your organization name
    • Your server IP address
    • Whether itโ€™s for production or staging
  2. Wait for confirmation that your IP is whitelisted
Problem: API works in staging but not production (or vice versa).Cause: Different servers have different IPs.Solution:Get the IP from each server and have all of them whitelisted:
Contact hello@doshi.app with all IPs.

Debugging Tools

Enable Debug Logging

Message Inspector

Network Monitor

Check iframe Status

Testing Checklist

Test with valid credentials
Test with invalid credentials
Test with missing token
Test with expired token
Test 2FA flow (if enabled)
Test on Chrome
Test on Firefox
Test on Safari
Test on Edge
Test on mobile Safari (iOS)
Test on mobile Chrome (Android)
Test with slow network (throttling)
Test with offline/online transitions
Test timeout scenarios
Test error recovery

Getting Help

If youโ€™re still experiencing issues after trying these solutions:

Contact Support

Email us at hello@doshi.app with:
  • Detailed description of the issue
  • Browser and OS information
  • Any error messages
  • Steps to reproduce

Check API Status

Verify Doshi services are operational

Quick Fixes Reference

Next Steps

Best Practices

Review implementation guidelines

Security

Ensure your implementation is secure