The Problem
You're calling an external API from a Supabase Edge Function, and it's being blocked. The API provider says they need a static IP to whitelist, but Edge Functions don't have one.
Why This Happens
Supabase Edge Functions run on Deno Deploy, which uses a distributed infrastructure. Requests can come from many different IP addresses, and there's no way to get a static IP.
What You Can Do
Option 1: Use a Proxy Service
Services like Apify or ScrapingBee can act as a proxy with a static IP. Your Edge Function calls them, and they call the external API.
Option 2: Move to a Server
If you need static IPs, consider:
- A VPS (DigitalOcean, Linode)
- AWS Lambda with VPC
- Google Cloud Functions with Cloud NAT
Option 3: Ask the API Provider
Some API providers can whitelist Deno Deploy's IP ranges, or offer alternative authentication methods like API keys or OAuth.
Key Takeaway
Edge Functions are great for many use cases, but if you need static IPs for API whitelisting, you'll need a different architecture.