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 HookMyApp gateway access token (hmat_…), scoped to this one channel. Pull it with hookmyapp channels env <channel> or hookmyapp channels token <channel>, or copy it from the channel page in the dashboard. Your app sends it as Authorization: Bearer; the gateway swaps it for the real Meta token server-side, so the Meta token never leaves HookMyApp.
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.
Token lifetimes and rotation
Your hmat_ gateway token does not expire. The Meta token behind it refreshes automatically inside HookMyApp (Instagram’s roughly 60-day rotation included); you never handle Meta token rotation yourself. If a background refresh ever fails, the channel’s health shows it and re-running hookmyapp channels connect instagram re-links the account.
If your gateway token leaks, rotate it: hookmyapp channels token <channel> --rotate, or the Rotate button on the channel page. The old token stops working immediately and the new one is shown once.
Next steps