A reverse proxy deployed on Vercel that forwards Meta (Facebook/Instagram) webhooks and OAuth callbacks to your local development tunnel (Pinggy).
Meta (Facebook) requires a fixed URL for Webhooks and OAuth Redirects. When developing locally using tunnels (Pinggy, Ngrok), the URL changes every time you restart. This proxy allows you to:
- Register a stable URL in Meta Developer Portal (once!)
- Auto-update the target tunnel when you restart your backend (
run.shhandles this)
Meta Servers → socialmedia-azmew-proxy.vercel.app → [Upstash Redis: tunnel URL] → Your Local Pinggy Tunnel → localhost:8081
- Go to upstash.com and create a free account
- Create a new Redis database (choose the region closest to your Vercel deployment)
- Copy the
UPSTASH_REDIS_REST_URLandUPSTASH_REDIS_REST_TOKENfrom the dashboard
In your Vercel project settings, add these environment variables:
| Variable | Description |
|---|---|
UPSTASH_REDIS_REST_URL |
Your Upstash Redis REST URL |
UPSTASH_REDIS_REST_TOKEN |
Your Upstash Redis REST Token |
PROXY_AUTH_TOKEN |
Secret token for tunnel registration (must match run.sh) |
💡 Tip: You can also use the Vercel Upstash Integration which auto-configures the environment variables.
cd meta-proxy
vercel deploy --prodWhen you run run.sh in the backend, it automatically:
- Starts a Pinggy tunnel
- Registers the new tunnel URL with this proxy
- Sends keep-alive pings every 5 minutes
| Method | Path | Description |
|---|---|---|
GET |
/ |
Status page showing current tunnel URL |
POST |
/_proxy/register |
Register/update tunnel URL (requires auth token) |
* |
/api/social/* |
Proxied to local tunnel |
Previous version stored the tunnel URL in-memory, which was lost on Vercel serverless cold starts (causing ENOTFOUND errors). Now uses Upstash Redis for persistence across all serverless function instances.