Skip to main content

What you will have

A ready-made chat app runs on your laptop.
You can start sending and receiving Instagram DMs in two minutes.

Install and authenticate

Start sandbox session

The CLI opens a DM to the HookMyApp test Instagram account. Send the prefilled message from your Instagram account. That account is now connected to this sandbox session. HookMyApp provides the test Instagram account, so you can start building before you connect your own.

Clone and run starter kit

You now have a ready-made chat app running locally.
Change it, restart it, and keep testing with the HookMyApp test account.

Listen for messages

This tells HookMyApp to send sandbox Instagram DMs to your computer while the command is running.
--path /webhook/instagram is the route in your local chat app that receives the DMs.

Send test message

This sends a test Instagram DM through the sandbox.
You can also DM the sandbox Instagram account from your connected account.
DMs appear in the starter kit chat. Reply from the chat input when you want to test sending.

Connect Instagram account

This opens Meta connect flow.
Sign in, choose the Instagram account, and grant the messaging permissions.

List channels

This shows the Instagram accounts connected to your workspace. See Connect Instagram for the full flow and what you get back.

Pull account env values

This replaces the sandbox values in .env with values for your connected account.
Your app gets a send URL, your Instagram account ID, and a channel token.
Use it to send from your connected Instagram account.
The receiver code does not change.

Listen locally to account

This tells HookMyApp to send DMs from your connected Instagram account to your computer while the command is running.
--path /webhook/instagram is the route in your local chat app that receives the DMs.
Stop the CLI with Ctrl-C when you are done.
Real DMs to your connected account now arrive on your laptop.
You can reply from the starter kit chat with your connected account too.

Set deployed webhook URL

Run this when your receiver is deployed behind a stable public URL.

Next steps