What you need
- A HookMyApp account
- A connected Instagram channel, or an Instagram sandbox for testing
- A channel token and Instagram user or account id for that channel
- An agent runtime that can read incoming DMs and send outgoing replies
Connect Instagram account
For testing, start an Instagram sandbox session:Configure agent
Pull credentials into a.env file your agent runtime can load.
For a sandbox session:
INSTAGRAM_GRAPH_API_URL: full send URL for this channelINSTAGRAM_ACCESS_TOKEN: channel token for sending DMsINSTAGRAM_ACCOUNT_ID: connected Instagram account ID used in the send URLWEBHOOK_HMAC_SECRET: webhook signing secret for your receiver
Agent capabilities
Your agent can receive DMs, send replies, and use the CLI to inspect the connected account.Send messages
Use the send URL and token from the env values. See Send text for the basic message shape.Listen to conversations
For local development, listen for messages on your laptop:Use with agent framework
If your personal agent runs on a framework like OpenClaw or Hermes, you do not have to write any transport code.These runtimes can run shell commands, so give them the HookMyApp CLI and your agent can send and receive DMs from your connected Instagram channel. Give your agent a prompt like this to wire it up:
Agent prompt
For other runtimes (Python, Go, Rust), use the same env values and adapt the transport on your side.
Next steps
- Build with AI: Use Cursor, Codex, or Claude Code to wire all this for you.
- CLI: Command reference for everything above.
- Send text: Send an Instagram text DM.
- Receive webhooks: Inbound webhook handling and signature verification.