Connect Instagram

Connect an Instagram professional account via Meta embedded signup. What you need, what happens during the popup, and what you get back.

Prerequisites

  • A HookMyApp account. Sign in with hookmyapp login.
  • An Instagram professional account (Business or Creator). Personal accounts cannot receive the messaging webhooks.
  • Either Instagram Login directly, or Instagram linked to a Facebook Page you control. Meta embedded signup supports both paths.

Run the connect command

Start the embedded-signup flow with the CLI. Pass instagram as the channel type.

hookmyapp channels connect instagram

The CLI opens a browser tab running Meta's embedded-signup flow. You sign in, pick the Instagram login path (Instagram Login directly, or Instagram via a linked Facebook Page), grant the messaging permissions, and select the Instagram account to connect.

For the underlying mechanism see Meta's Instagram messaging docs.

What you get back

  • The channel's Channel ID (ch_xxxxxxxx) is what you pass to per-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 pass the Instagram handle (@yourhandle) as the channel reference.
  • INSTAGRAM_ACCESS_TOKEN: a long-lived Meta access token, with about 60-day rotation. Pull with hookmyapp channels env <channel> or hookmyapp channels token <channel>.
  • INSTAGRAM_USER_ID: the Instagram-scoped user id Meta assigns to your connected account. Used in the send URL.

One account, one workspace. An Instagram account can only be connected in one workspace at a time. If another workspace already owns it, the connect fails with "This Instagram account is already connected to another workspace. Disconnect it there first to use it here." Disconnect it there, then retry.

60-day token refresh

Access tokens refresh automatically in the background. You should never have to manually rotate. If a refresh ever fails, re-run hookmyapp channels connect instagram to mint a new token.

If a token leaks, rotate it immediately through the Meta App Dashboard, then re-pull. hookmyapp channels env <channel> will reflect the new token on next call.

Next steps