Skip to content

Instagram Channel

Use an Instagram channel when your audience mainly interacts with your brand through Instagram Direct Messages and you want the agent to answer directly in Instagram DM.

For Codeer, the important live endpoint is the Webhook URL. Publishing an Instagram channel mostly controls whether Codeer starts processing Instagram webhook events. The bound agent still answers with its current published version.

What you need before you start

  • One agent with at least one published version
  • Permission to edit channels in the workspace
  • An Instagram Business or Creator account
  • That Instagram account connected to a Facebook Page you can manage
  • A Meta app
  • Instagram messaging settings available in that Meta app
  • An access token that can send Instagram messages
  • A public HTTPS Codeer environment

Why public HTTPS matters

Meta only accepts webhooks that are reachable over public HTTPS. If the Webhook URL from Codeer is not publicly reachable, Meta will fail at the webhook verify step.

What you will prepare in Meta

  1. A Meta app

  2. An Instagram Business or Creator account

  3. The Facebook Page connected to that Instagram account

  4. Instagram messaging settings

  5. A webhook configuration whose callback URL points to Codeer's Webhook URL

  6. A subscription for the Instagram account's messaging events

  7. An access token that can send Instagram messages

Keep the Instagram Account ID, token, and webhook subscription aligned

Codeer checks incoming webhook events against the Instagram Account ID you enter for this channel. If the Account ID, access token, and webhook subscription do not belong to the same Instagram account, messages may be ignored or Codeer may fail to reply.

Full setup flow

  1. Create the Codeer Instagram channel and copy the Webhook URL

    • In Codeer, publish the target agent from Editor first.
    • Open Channels.
    • Click New Channel.
    • Choose Instagram.
    • Give the channel a stable Name and Slug.
    • In the Instagram channel Configuration, copy the Webhook URL.
    • Do not publish the Codeer Instagram channel yet. First collect the required Meta-side values, save them in Codeer, and then return to Meta to configure and verify the webhook.
  2. Confirm the Instagram account state

    • Confirm that the target Instagram account is a Business or Creator account.
    • Confirm that it is connected to a Facebook Page.
    • Confirm that your Meta account has permission to manage the Instagram account and its connected Page.

    Instagram messaging permissions usually flow through the connected Facebook Page

    If the Instagram account does not appear in Meta, first check that it is a professional account, that it is connected to the correct Page, and that your Meta Business permissions include the asset.

  3. Add Instagram messaging settings to the Meta app

    • Open Meta for Developers.
    • Open the Meta app you want to use for Instagram DM.
    • Add the Instagram product or messaging use case.
    • Connect the Instagram Business / Creator account that users will message.
    • Confirm that the app has permission to receive and send messages for that Instagram account.

    Meta dashboard labels may change

    Meta changes App Dashboard navigation and use case names over time. The important parts are: the app is connected to the right Instagram account, webhook verification works, and the token can send Instagram messages.

  4. Get the Instagram Account ID

    • Find the target Instagram Business account ID in Meta App Dashboard, Instagram account settings, or Graph API tooling.
    • This ID usually looks like a long number, for example 17841400000000000.
    • Copy the ID. You will paste it into Codeer as Instagram Account ID.
  5. Create a Webhook Verify Token

    • Generate a hard-to-guess string for this channel's Webhook Verify Token.
    • Keep it ready. You will enter the same value in Meta's webhook settings and in the Codeer form.

    Verify Token is not the access token

    Webhook Verify Token is a shared string you choose for Meta webhook verification. Access Token is the token Codeer uses to send Instagram messages. Do not reuse one as the other.

  6. Copy the Meta App Secret

    • In Meta App Dashboard, open App Settings > Basic.
    • Find and copy App Secret.
    • You will paste it into Codeer as Meta App Secret.

    Meta App Dashboard Basic settings page showing where to find App Secret

    Codeer uses App Secret to verify webhook signatures

    When Instagram webhooks reach Codeer, Codeer uses Meta App Secret to verify X-Hub-Signature-256. If the App Secret is wrong, events will be ignored.

  7. Create or get an access token that can send Instagram messages

    • In Meta App Dashboard, Graph API Explorer, or your existing Meta token flow, get an access token that can send Instagram messages.
    • Confirm that the token belongs to the same Instagram account you entered in Codeer as Instagram Account ID.
    • You will paste it into Codeer as Access Token.

    Instagram settings page showing the Instagram messaging access token generation area

    Confirm token and permission status before production

    If the app is still in development mode or you only have a test token, testing may be limited to people with app roles. Before serving normal users, confirm that the Meta app, permissions, and token match your production rollout plan.

  8. Save the Instagram configuration in Codeer

    • Return to the Codeer Instagram channel.
    • In Configuration, enter:
      • Instagram Account ID
      • Webhook Verify Token
      • Meta App Secret
      • Access Token
    • Choose the published agent that should answer Instagram DMs.
    • Save the configuration.

    Save the Verify Token before verifying the webhook in Meta

    When Meta verifies the webhook, it calls Codeer's Webhook URL with the verify token you entered in Meta. Codeer compares that value with the Webhook Verify Token already saved on the channel, so this step must happen before Meta verify / save.

    Only published agents appear in the selector

    If the agent is missing, go back to Editor, publish it, and then return to the Instagram channel page.

  9. Configure the webhook in Meta

    • In the Meta app's Instagram / Webhooks settings, add a callback.
    • Paste Codeer's Webhook URL into Callback URL.
    • Enter the Webhook Verify Token you created earlier.
    • Click verify / save in Meta.
    • After verification succeeds, subscribe the Instagram account that should receive messages.
    • Subscribe at least the Instagram messaging events so Codeer receives user DMs.

    Instagram settings page showing the webhook callback URL and verify token fields

  10. Publish the Codeer Instagram channel

    • After webhook, Instagram Account ID, credentials, and agent binding are ready, publish the channel.
    • Use Unpublish if you want Codeer to stop processing new Instagram events.

First live test

Before sharing the channel more widely, run through the full flow with a real Instagram account.

  1. Open the DM for the target Instagram account.

  2. Send a realistic text message.

  3. Confirm that Instagram DM receives the agent reply.

  4. Go back to Codeer Histories and confirm that the conversation is recorded.

  5. Confirm that the reply comes from the bound agent's latest published version.

Troubleshooting

If Instagram is connected but the reply is wrong, check these in order:

  1. The correct agent version is published.

  2. The Instagram channel is published.

  3. Meta webhook verification succeeded.

  4. The webhook is subscribed to the correct Instagram account.

  5. Instagram Account ID belongs to the same Instagram account as the webhook event and access token.

  6. The Instagram account is Business or Creator, and is connected to the correct Facebook Page.

  7. Webhook Verify Token exactly matches the value in Meta webhook settings.

  8. Meta App Secret comes from the same Meta app.

  9. Access Token is still valid and can send Instagram messages.