Prerequisites
- A HookMyApp account.
Sign in withhookmyapp login. - An Instagram professional account (Business or Creator).
Personal accounts cannot receive the messaging webhooks.
Run connect command
Start the Instagram OAuth flow with the CLI.Pass
instagram as the channel type.
Sign in to Instagram.
Grant HookMyApp the requested permissions.
You do not use Facebook Login or WhatsApp Embedded Signup for this flow. For Meta setup details, see Meta Instagram messaging docs.
What you get back
- Channel ID (
ch_xxxxxxxx): use it in channel commands, likehookmyapp channels env <channel>,hookmyapp channels webhook set <channel>, andhookmyapp channels health <channel>.
Find it withhookmyapp channels list. You can also use the Instagram handle, like@yourhandle. INSTAGRAM_ACCESS_TOKEN: the token your app sends in theAuthorization: Bearerheader.
Get it withhookmyapp channels env <channel>orhookmyapp channels token <channel>, or copy it from the channel page.INSTAGRAM_ACCOUNT_ID: the account ID used in the send URL.
Token lifetimes and rotation
Your channel token does not expire.If the channel loses permission to send, the channel health page shows it and
hookmyapp channels connect instagram re-links the account.
If your channel token leaks, rotate it: hookmyapp channels token <channel> --rotate, or the Rotate button on the channel page.The old token stops working immediately. Print the current token anytime with
hookmyapp channels token <channel>.
Reconnect
If you connected your Instagram account before publishing, insights, and comments were available, reconnect once: open the channel’s detail page in the dashboard and use Reconnect. The channel updates in place and DMs keep working throughout.Next steps
- Webhook routing: Find and set your own webhook URL.
- Send text: Send your first Instagram DM.