Skip to main content

Prerequisites

  • A HookMyApp account.
    Sign in with hookmyapp 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.
Your browser opens Instagram’s authorization page.
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, like hookmyapp channels env <channel>, hookmyapp channels webhook set <channel>, and hookmyapp channels health <channel>.
    Find it with hookmyapp channels list. You can also use the Instagram handle, like @yourhandle.
  • INSTAGRAM_ACCESS_TOKEN: the token your app sends in the Authorization: Bearer header.
    Get it with hookmyapp channels env <channel> or hookmyapp 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