npm install to a webhook receiving real Instagram DMs on your laptop.
What you’ll have
In a few minutes you’ll be sending and receiving real Instagram DMs from your own app, running on your laptop. DM a sandbox Instagram account from your own account, watch the message land in your code in under a second, and reply right back.Install and authenticate
hookmyapp login opens a browser tab. After sign-in, the CLI writes a credential token to a local file in your config directory.
Start a sandbox session
ig.me deep link to the sandbox Instagram account. DM that account from the Instagram account you want to bind. That message is what pins the session to your account (it proves you control it; we can’t take your word for it). Open the deep link on your phone to start the DM with the code prefilled.
The sandbox is a test Instagram account you can use right away. It removes Meta paperwork: no Business Manager, no connected account of your own, no access token.
Clone and run the starter kit
POST /webhook/instagram and POST /webhook/whatsapp (it serves both channels at once), per-channel send(to, text) helpers, an auto-reply you can customize, and an .env.example the CLI fills in. hookmyapp sandbox env --write .env writes the sandbox proxy URL, your session activation code, the test account’s ID, and a VERIFY_TOKEN for HMAC verification.
Open the tunnel
http://localhost:3000/webhook/instagram. The tunnel lives as long as the CLI process runs.
Send a test message
DM the sandbox Instagram account from your pinned account. Your receiver logs the inbound webhook. The starter kit’s auto-reply lands back in your DMs. You can also send a one-shot test from the CLI:From the sandbox to your own account
When you’re ready for your own Instagram account, the dev loop stays the same: same receiver code, same local tunnel, just a real channel.Connect your Instagram account
ch_xxxxxxxx). Confirm with:
Pull your account’s env
.env with your own account’s: INSTAGRAM_GRAPH_API_URL (the HookMyApp gateway, <gateway>/<graph-version>), your INSTAGRAM_USER_ID, and a scoped gateway access token (hmat_…) in INSTAGRAM_ACCESS_TOKEN. Both base URLs point at the gateway, which swaps the hmat_ token for the real Meta token server-side. The receiver code does not change.
Listen locally against your account
hookmyapp sandbox listen, but on your own channel. Opens a secure tunnel from a HookMyApp-managed hostname to localhost:3000/webhook/instagram and points Meta at it while the CLI runs. Stop the CLI (Ctrl-C) and the tunnel is reclaimed; Meta’s webhook URL reverts to whatever was set before.
Real DMs to your connected account now arrive on your laptop. The same auto-reply works.
Set your own webhook URL (when you deploy)
When your receiver is deployed behind a stable public URL, replace the tunnel with that URL:override_callback_uri via the Graph API.
Next steps
- Connect Instagram: Meta embedded signup and the duplicate-workspace rule.
- Send messages: The send call, curl and Node examples, the 24-hour window.
- Receive webhooks: Verify the signature and acknowledge fast.
- Build with AI: Let Cursor, Codex, or Claude Code do this for you.