Skip to main content

Troubleshooting

This guide covers common issues and their solutions when using the Pictify API.

Authentication Issues

”Invalid API Key” (401)

Symptoms: API returns 401 Unauthorized with “Invalid API Key” message. Solutions:
  1. Verify the key format
    • Live keys start with pk_live_
    • Test keys start with pk_test_
  2. Check for extra characters
  3. Verify the key isn’t revoked
    • Check in Dashboard > Settings > API Keys
  4. Ensure correct environment
    • Test keys don’t work in production mode

”Missing Authorization” (401)

Symptoms: API returns 401 with “Missing Authorization” message. Solutions:

Rendering Issues

Blank or White Images

Symptoms: Generated image is blank or all white. Solutions:
  1. Check HTML has visible content
  2. Ensure content is within viewport
    • Content outside the width/height won’t be captured
  3. Set an explicit background color

Missing Fonts

Symptoms: Text appears in default/fallback font. Solutions:
  1. Use web fonts with @import
  2. Use web-safe fonts as fallback
  3. Load fonts in the document head

CSS Not Applied

Symptoms: Styles are missing or incorrect. Solutions:
  1. Use inline styles for reliability
  2. Check for unsupported CSS
    • Some advanced CSS features may not render correctly
    • Test complex layouts in browser first
  3. Avoid external stylesheets on slow domains
    • External CSS must load before rendering

Images Not Loading

Symptoms: Images show as broken or missing. Solutions:
  1. Use absolute URLs
  2. Verify URL is accessible
    • Images must be publicly accessible
    • Check for CORS issues
  3. Inline critical images as data URIs

Timeout Errors

Symptoms: Render fails with timeout error. Solutions:
  1. Simplify the template
    • Remove complex gradients, shadows
    • Reduce number of elements
  2. Optimize images
    • Use smaller image files
    • Compress before including
  3. Reduce external resources
    • Minimize external CSS/JS
    • Self-host critical resources

Template Issues

Variables Not Interpolating

Symptoms: {{variable}} appears literally in output. Solutions:
  1. Check variable syntax
  2. Verify variable is provided
  3. Check for typos
    • Variable names are case-sensitive
    • {{Title}} !== {{title}}

Expression Errors

Symptoms: Expression fails to evaluate. Solutions:
  1. Test expressions separately
  2. Check function syntax
  3. Ensure variables exist
    • Undefined variables cause expression errors

Rate Limiting

”Rate Limit Exceeded” (429)

Symptoms: API returns 429 Too Many Requests. Solutions:
  1. Check headers for limit info
  2. Implement exponential backoff
  3. Use batch API for bulk operations
    • Single batch request vs. many individual requests
  4. Consider upgrading plan
    • Higher tiers have higher limits

Webhook Issues

Webhooks Not Received

Symptoms: Webhook endpoint never receives requests. Solutions:
  1. Verify endpoint is accessible
  2. Check firewall/security rules
    • Allow incoming requests from Pictify IPs
    • Ensure HTTPS certificate is valid
  3. Verify subscription is active
    • Check in Dashboard > Settings > Webhooks
    • Status should be “active”

Signature Verification Failing

Symptoms: Webhook signature doesn’t match. Solutions:
  1. Use raw body for verification
  2. Check timestamp tolerance
    • Default is 5 minutes
    • Ensure server clock is synced
  3. Verify using correct secret
    • Each subscription has a unique secret
    • Secret is only shown at creation

SDK Issues

Module Not Found

Symptoms: Cannot find module '@pictify/sdk' Solutions:

TypeScript Errors

Symptoms: TypeScript compilation errors with SDK. Solutions:
  1. Update TypeScript
  2. Check tsconfig.json

Still Need Help?

If you’re still experiencing issues:
  1. Check the status page: status.pictify.io
  2. Search existing issues: GitHub Issues
  3. Contact support: support@pictify.io
When reporting issues, include:
  • API endpoint and method
  • Request payload (without API key)
  • Error response
  • SDK version (if applicable)